feat(multisig): allow to import existing multisig by address#1397
Draft
feat(multisig): allow to import existing multisig by address#1397
Conversation
Signed-off-by: Norman Meier <norman@samourai.coop>
✅ Deploy Preview for testitori ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for teritori-dapp ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
WaDadidou
requested changes
Nov 20, 2024
| label="Optional existing multisig address" | ||
| onChangeText={async (addr) => { | ||
| try { | ||
| console.log("addr", addr); |
Collaborator
There was a problem hiding this comment.
Please remove console.log usages
| variant="labelOutside" | ||
| noBrokenCorners | ||
| label="Optional existing multisig address" | ||
| onChangeText={async (addr) => { |
Collaborator
There was a problem hiding this comment.
It's more lisible to use a function and remove the logic from the JSX imo
| try { | ||
| console.log("addr", addr); | ||
| if (selectedNetwork?.kind !== NetworkKind.Cosmos) { | ||
| console.error("not a cosmos netwokr"); |
Collaborator
There was a problem hiding this comment.
Suggested change
| console.error("not a cosmos netwokr"); | |
| console.error("not a cosmos network"); |
| return; | ||
| } | ||
| const client = await getNonSigningStargateClient(networkId); | ||
| const account = await client.getAccount(addr); |
Collaborator
There was a problem hiding this comment.
We should validateAddress before using the addr to getAccount to avoid unnecessary queries.
Wdyt?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a field to enter the address of a multisig that already exists on-chain. It will auto-fill the other fields and populate the public keys.
Some of our users have lost one of the member of their multisig.
This member never made a tx on-chain so we can't recover the public key with the usual
getAccounton the member's address.We can however import the public keys from the chain because the multisig "public key" embeds the members public keys.
For example on CLI:
This is how it looks like: