-
Notifications
You must be signed in to change notification settings - Fork 12
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
fixes keystone vault registration failure #5797
base: sprint
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -209,16 +209,26 @@ export const getSignerNameFromType = (type: SignerType, isMock = false, isAmf = | |
return name; | ||
}; | ||
|
||
export const getWalletConfig = ({ vault }: { vault: Vault }) => { | ||
let line = '# Multisig setup file (exported from Keeper)\n'; | ||
export const getWalletConfig = ({ vault, signerType }: { vault: Vault; signerType?: string }) => { | ||
const isKeystone = signerType === SignerType.KEYSTONE; | ||
let line = ''; | ||
if (isKeystone) line += 'Y q'; | ||
line += `# ${isKeystone ? 'Keystone' : ''} Multisig setup file (exported from Keeper)\n`; | ||
if (isKeystone) line += '#\n'; | ||
line += `Name: ${vault.presentationData.name}\n`; | ||
line += `Policy: ${vault.scheme.m} of ${vault.scheme.n}\n`; | ||
if (isKeystone) line += `Derivation: ${vault.signers[0].derivationPath.replaceAll('h', "'")}\n`; | ||
line += 'Format: P2WSH\n'; | ||
line += '\n'; | ||
vault.signers.forEach((signer) => { | ||
line += `Derivation:${signer.derivationPath.replaceAll('h', "'")}\n`; | ||
line += `${signer.masterFingerprint}:`; | ||
line += `${signer.xpub}\n\n`; | ||
if (isKeystone) { | ||
line += `${signer.masterFingerprint}: `; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This here has a space and the normal otpion doesn't, is that space needed? |
||
line += `${signer.xpub}\n`; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also here it's \n and in the normal it's double \n can you confirm this difference is necessary? |
||
} else { | ||
line += `Derivation:${signer.derivationPath.replaceAll('h', "'")}\n`; | ||
line += `${signer.masterFingerprint}:`; | ||
line += `${signer.xpub}\n\n`; | ||
} | ||
}); | ||
return line; | ||
}; | ||
|
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 currently has double space if it is not keystone.