Skip to content

feat: hybrid signature and mnemonic import#1

Open
ruseinov wants to merge 4 commits into
masterfrom
v0.2
Open

feat: hybrid signature and mnemonic import#1
ruseinov wants to merge 4 commits into
masterfrom
v0.2

Conversation

@ruseinov

Copy link
Copy Markdown
Collaborator

No description provided.

@augmentcode

augmentcode Bot commented Jun 18, 2026

Copy link
Copy Markdown
🤖 Augment PR Summary

Summary: This PR adds an opt-in Quip “dev signer” injection flow and a UI path to import Quip accounts by mnemonic/seed.

Changes:

  • App bootstrap now runs initQuipSigner() before rendering to ensure the Quip signer and extrinsic fake-signature patch are applied early.
  • Introduced packages/apps/src/initQuipSigner.ts to gate signer injection via env/query/localStorage, load Quip WASM + signer modules, and inject dev-seed accounts.
  • Patched polkadot-js fake signature sizing to accommodate Quip hybrid signatures for fee estimation.
  • Exposed a minimal globalThis.quipSigner UI API so page-accounts can import mnemonics without a circular dependency.
  • Added a new “From Quip mnemonic” action and modal to page-accounts when the Quip signer API is present.
  • Webpack now defines process.env.QUIP_DEV_SIGNER and extends module resolution to include the repo-level node_modules.

Technical Notes: Signer injection is explicitly opt-in (env/query/storage) and uses dynamic imports + WASM initialization before enabling mnemonic import into the injected keyring path.

🤖 Was this summary useful? React with 👍 or 👎

@augmentcode augmentcode Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 2 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

return;
}

isInjected = true;

@augmentcode augmentcode Bot Jun 18, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

packages/apps/src/initQuipSigner.ts:84 — isInjected is set to true before the async dynamic imports/wasm init. If any of those steps throw, the session will be permanently marked as injected and later calls to initQuipSigner() won’t retry even though nothing was actually injected.

Severity: medium

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

Comment on lines +54 to +59
onClose();
})
.catch((error: Error): void => {
onStatusChange({ action: 'create', message: error.message, status: 'error' });
})
.finally(() => setIsBusy(false));

@augmentcode augmentcode Bot Jun 18, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

packages/page-accounts/src/modals/QuipMnemonic.tsx:54-59 — On success you call onClose() (likely unmounting the modal) and then .finally(() => setIsBusy(false)) still runs, which can update state after unmount. This can lead to noisy warnings or flaky behavior around closing the modal immediately after import.

Severity: low

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

@ruseinov

Copy link
Copy Markdown
Collaborator Author

Beware of relative paths! this is not to be merged in it's current state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant