Skip to content
This repository has been archived by the owner on Jul 15, 2022. It is now read-only.

Commit

Permalink
Family/crypto org (#1852)
Browse files Browse the repository at this point in the history
* LIVE-1743 Fix crypto.com address derivation path (#1836)

* trigger bot

* Tentative to fix crypto.com use of address

Co-authored-by: Thomas Nguy <[email protected]>
  • Loading branch information
2 people authored and lambertkevin committed Apr 11, 2022
1 parent c54b189 commit 29c4f00
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/families/crypto_org/js-buildTransaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const buildTransaction = async (
publicKey: string
) => {
const croSdk = getCroSdk(a.currency.id);
const address = a.freshAddresses[0].address;
const address = a.freshAddress;
const { accountNumber, sequence } = await getAccountParams(
address,
a.currency.id
Expand Down
5 changes: 2 additions & 3 deletions src/families/crypto_org/js-signOperation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,9 @@ const signOperation = ({

// Get the public key
const hwApp = new CryptoOrgApp(transport);
const address = account.freshAddresses[0];
const cointype = isTestNet(account.currency.id) ? "tcro" : "cro";
const { publicKey } = await hwApp.getAddress(
address.derivationPath,
account.freshAddressPath,
cointype,
false
);
Expand All @@ -131,7 +130,7 @@ const signOperation = ({
);
// Sign by device
const { signature } = await hwApp.sign(
address.derivationPath,
account.freshAddressPath,
unsigned.toSignDocument(0).toUint8Array()
);

Expand Down

0 comments on commit 29c4f00

Please sign in to comment.