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

Commit

Permalink
LIVE-1743 Fix crypto.com address derivation path (#1836)
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-nguy authored Mar 30, 2022
1 parent c0e9695 commit 3d716cb
Showing 1 changed file with 2 additions and 3 deletions.
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 @@ -119,10 +119,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 @@ -133,7 +132,7 @@ const signOperation = ({
);
// Sign by device
const { signature } = await hwApp.sign(
address.derivationPath,
account.freshAddressPath,
unsigned.toSignDocument(0).toUint8Array()
);

Expand Down

1 comment on commit 3d716cb

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ 1 txs ❌ 1 txs ($2.39) for Bot 'crypto.org on Mooncake'

⚠️ 1 mutations uncovered

1 mutation errors
all accounts sync in 7.5s
▬ Crypto.orgChain 2.16.7 on nanoS 2.1.0
→ FROM Crypto.org 1 cross: 1.2499 CRO (6ops) (cro13u8utn84f2w453l5wvq6p2s7pp5ytht3jyaq7p on 44'/394'/0'/0/0) #0 js:2:crypto_org:cro13u8utn84f2w453l5wvq6p2s7pp5ytht3jyaq7p: (! sum of ops 1.25005 CRO) 1.2499 CRO spendable. 

max spendable ~1.2498
★ using mutation 'move 50%'
→ TO Crypto.org 2: 0.019432 CRO (8ops) (cro1ssrr3ha0d04s37dlf4d37qq0fazpypd04rsdka on 44'/394'/1'/0/0) #1 js:2:crypto_org:cro1ssrr3ha0d04s37dlf4d37qq0fazpypd04rsdka:
✔️ transaction 
SEND  0.62495 CRO
TO cro1ssrr3ha0d04s37dlf4d37qq0fazpypd04rsdka
STATUS (41ms)
  amount: 0.62495 CRO
  estimated fees: 0.00005 CRO
  total spent: 0.625 CRO
⚠️ TypeError: Cannot read property 'address' of undefined

TypeError: Cannot read property 'address' of undefined
Details of the 2 mutations

Spec Crypto.org Testnet (failed)

Spec Crypto.org Testnet found 1 Crypto.org Croeseid accounts. Will use Crypto.orgChain 2.16.7 on nanoS 2.1.0
(5.8s) Crypto.org Croeseid 1 cross: 0 tcro (0ops) (tcro13u8utn84f2w453l5wvq6p2s7pp5ytht3u35y7s on 44'/394'/0'/0/0) #0 js:2:crypto_org_croeseid:tcro13u8utn84f2w453l5wvq6p2s7pp5ytht3u35y7s:

This SEED does not have Crypto.org Croeseid. Please send funds to tcro13u8utn84f2w453l5wvq6p2s7pp5ytht3u35y7s

Spec Crypto.org (5)

Spec Crypto.org found 5 Crypto.org accounts. Will use Crypto.orgChain 2.16.7 on nanoS 2.1.0
(3.8s) Crypto.org 1 cross: 1.2499 CRO (6ops) (cro13u8utn84f2w453l5wvq6p2s7pp5ytht3jyaq7p on 44'/394'/0'/0/0) #0 js:2:crypto_org:cro13u8utn84f2w453l5wvq6p2s7pp5ytht3jyaq7p:
(2550ms) Crypto.org 2: 0.019432 CRO (8ops) (cro1ssrr3ha0d04s37dlf4d37qq0fazpypd04rsdka on 44'/394'/1'/0/0) #1 js:2:crypto_org:cro1ssrr3ha0d04s37dlf4d37qq0fazpypd04rsdka:
(3.7s) Crypto.org 3: 3.71 CRO (6ops) (cro1tcng235387dgklyqa2jwyc2kuptn83cxslrwdd on 44'/394'/2'/0/0) #2 js:2:crypto_org:cro1tcng235387dgklyqa2jwyc2kuptn83cxslrwdd:
(2543ms) Crypto.org 4: 0.019482 CRO (1ops) (cro1gwfycg8tn94f3mar5hz4ncewpprldu2u2md2zh on 44'/394'/3'/0/0) #3 js:2:crypto_org:cro1gwfycg8tn94f3mar5hz4ncewpprldu2u2md2zh:
(5s) Crypto.org 5: 0 CRO (0ops) (cro1pmulzzjlhldnjyftvey94upd9wyfyr76k98wkp on 44'/394'/4'/0/0) #4 js:2:crypto_org:cro1pmulzzjlhldnjyftvey94upd9wyfyr76k98wkp:
all accounts sync in 7.5s
▬ Crypto.orgChain 2.16.7 on nanoS 2.1.0
→ FROM Crypto.org 1 cross: 1.2499 CRO (6ops) (cro13u8utn84f2w453l5wvq6p2s7pp5ytht3jyaq7p on 44'/394'/0'/0/0) #0 js:2:crypto_org:cro13u8utn84f2w453l5wvq6p2s7pp5ytht3jyaq7p: (! sum of ops 1.25005 CRO) 1.2499 CRO spendable. 

max spendable ~1.2498
★ using mutation 'move 50%'
→ TO Crypto.org 2: 0.019432 CRO (8ops) (cro1ssrr3ha0d04s37dlf4d37qq0fazpypd04rsdka on 44'/394'/1'/0/0) #1 js:2:crypto_org:cro1ssrr3ha0d04s37dlf4d37qq0fazpypd04rsdka:
✔️ transaction 
SEND  0.62495 CRO
TO cro1ssrr3ha0d04s37dlf4d37qq0fazpypd04rsdka
STATUS (41ms)
  amount: 0.62495 CRO
  estimated fees: 0.00005 CRO
  total spent: 0.625 CRO
⚠️ TypeError: Cannot read property 'address' of undefined

all accounts sync in 7.1s
▬ Crypto.orgChain 2.16.7 on nanoS 2.1.0
→ FROM Crypto.org 2: 0.019432 CRO (8ops) (cro1ssrr3ha0d04s37dlf4d37qq0fazpypd04rsdka on 44'/394'/1'/0/0) #1 js:2:crypto_org:cro1ssrr3ha0d04s37dlf4d37qq0fazpypd04rsdka: (! sum of ops 0.01978203 CRO) 0.01943203 CRO spendable. 

max spendable ~0.019382
★ using mutation 'move 50%'
→ TO Crypto.org 3: 3.71 CRO (6ops) (cro1tcng235387dgklyqa2jwyc2kuptn83cxslrwdd on 44'/394'/2'/0/0) #2 js:2:crypto_org:cro1tcng235387dgklyqa2jwyc2kuptn83cxslrwdd:
✔️ transaction 
SEND  0.00971602 CRO
TO cro1tcng235387dgklyqa2jwyc2kuptn83cxslrwdd
STATUS (2.46ms)
  amount: 0.00971602 CRO
  estimated fees: 0.00005 CRO
  total spent: 0.00976602 CRO
✔️ has been signed! (2733ms) 
✔️ broadcasted! (6.6s) optimistic operation: 
  -0.00976602 CRO    OUT        7D820C071F06800E18BD527F27F1500964597815583C66CB5D536E7501F7B7A0 2022-03-30T07:21
✔️ operation confirmed (7.8s): 
  -0.00971602 CRO    OUT        7D820C071F06800E18BD527F27F1500964597815583C66CB5D536E7501F7B7A0 2022-03-30T07:21
✔️ Crypto.org 2: 0.009666 CRO (9ops) (cro1ssrr3ha0d04s37dlf4d37qq0fazpypd04rsdka on 44'/394'/1'/0/0) #1 js:2:crypto_org:cro1ssrr3ha0d04s37dlf4d37qq0fazpypd04rsdka: (! sum of ops 0.01006601 CRO) 0.00966601 CRO spendable. 

(final state reached in 7.8s)


Details of the 1 uncovered mutations

Spec Crypto.org Testnet (1)

  • move 50%:

Portfolio ($2.39)

⚠️ 1 specs don't have enough funds! (Crypto.org Testnet)

Details of the 2 currencies
Spec (accounts) Operations Balance funds?
Crypto.org Testnet (0) 0 0 tcro ($0.00) ??? tcro13u8utn84f2w453l5wvq6p2s7pp5ytht3u35y7s
Crypto.org (3) 23 (+2) 4.999 CRO (- 0.00005) ($2.39) 💪 cro13u8utn84f2w453l5wvq6p2s7pp5ytht3jyaq7p

Please sign in to comment.