-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(multisig): allow to import existing multisig by address #1397
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Norman Meier <[email protected]>
✅ 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. |
label="Optional existing multisig address" | ||
onChangeText={async (addr) => { | ||
try { | ||
console.log("addr", addr); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove console.log usages
variant="labelOutside" | ||
noBrokenCorners | ||
label="Optional existing multisig address" | ||
onChangeText={async (addr) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
console.error("not a cosmos netwokr"); | |
console.error("not a cosmos network"); |
return; | ||
} | ||
const client = await getNonSigningStargateClient(networkId); | ||
const account = await client.getAccount(addr); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should validateAddress
before using the addr
to getAccount
to avoid unnecessary queries.
Wdyt?
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
getAccount
on 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: