-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: resolve transaction signature mismatch with cosigners (#1324)
* fix: signature mismatch with cosigners * chore: update SDK packages * chore: add todo task * fix: use non-extended key hash in shared wallet script --------- Co-authored-by: Martynas Kazlauskas <martynas.kazlauskas@iohk.io>
- Loading branch information
1 parent
e09e9e2
commit 0e9f83b
Showing
13 changed files
with
318 additions
and
339 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Empty file.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { Wallet } from '@lace/cardano'; | ||
import { paymentScriptKeyPath, stakingScriptKeyPath } from '@src/shared-wallets'; | ||
|
||
export const hasSigned = async ( | ||
key: Wallet.Crypto.Bip32PublicKeyHex, | ||
type: 'payment' | 'staking', | ||
signatures: Wallet.Cardano.Signatures, | ||
) => { | ||
const derivationPath = type === 'payment' ? paymentScriptKeyPath : stakingScriptKeyPath; | ||
const accountKey = Wallet.Crypto.Bip32PublicKey.fromHex(key); | ||
const xkey = await accountKey.derive([derivationPath.role, derivationPath.index]); | ||
const hash = xkey.toRawKey().hex(); | ||
return signatures.has(hash); | ||
}; |
This file contains 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
This file contains 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
Oops, something went wrong.