Skip to content

Commit

Permalink
Filecoin: replace CBOR lib, removing BigInt types inside (#928)
Browse files Browse the repository at this point in the history
replace cbor lib to get rid of BigInt
  • Loading branch information
emmanuelm41 authored and hakim-adamik committed Aug 24, 2022
1 parent d61ab5d commit dd538c3
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 511 deletions.
5 changes: 5 additions & 0 deletions .changeset/pretty-cars-know.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@ledgerhq/live-common": minor
---

replace cbor lib to get rid of BigInt type
2 changes: 1 addition & 1 deletion libs/ledger-live-common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@
"@types/qs": "^6.9.7",
"@walletconnect/client": "1.7.3",
"@xstate/react": "^1.6.3",
"@zondax/cbor": "v8.1.0-zondax-no-bigint",
"@zondax/ledger-filecoin": "^0.11.2",
"algo-msgpack-with-bigint": "^2.1.1",
"algosdk": "1.13.0",
Expand All @@ -182,7 +183,6 @@
"bs58check": "^2.1.2",
"buffer": "^6.0.3",
"cashaddrjs": "^0.4.4",
"cbor": "^8.1.0",
"coininfo": "^5.1.0",
"cosmjs-types": "0.2.1",
"create-hmac": "^1.1.7",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import cbor from "cbor";
import cbor from "@zondax/cbor";
import { Transaction } from "../../types";
import BigNumber from "bignumber.js";

Expand Down
Loading

1 comment on commit dd538c3

@github-actions
Copy link

Choose a reason for hiding this comment

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

⏲ 7min 6s ✅ 2 txs ($3.04) for [Bot] 'Filecoin on Mooncake'

✅ 1 specs are successful: Filecoin

Details of the 2 mutations

Spec Filecoin (5)

Spec Filecoin found 5 Filecoin accounts. Will use Filecoin 0.22.5 on nanoS 2.1.0
Filecoin 1 cross: 0.00004495 FIL (37ops) (f1uxfmur64lbpcblhw7mlmi3s7ocii33e5niv4gda on 44'/461'/0'/0/0) #0 js:2:filecoin:f1uxfmur64lbpcblhw7mlmi3s7ocii33e5niv4gda:
Filecoin 2: 0.12075 FIL (61ops) (f154ruht7usm2dr2c2bezsmqepesdaum2nyjaacei on 44'/461'/1'/0/0) #1 js:2:filecoin:f154ruht7usm2dr2c2bezsmqepesdaum2nyjaacei:
Filecoin 3: 0.12426 FIL (35ops) (f1j3fqrrqsxqfwnzowmhe3ljarl34t6cni3aotlai on 44'/461'/2'/0/0) #2 js:2:filecoin:f1j3fqrrqsxqfwnzowmhe3ljarl34t6cni3aotlai:
Filecoin 4: 0.24221 FIL (2ops) (f17hf2u6d5rq4gpznjbifylzizfsyenxo3meyad2a on 44'/461'/3'/0/0) #3 js:2:filecoin:f17hf2u6d5rq4gpznjbifylzizfsyenxo3meyad2a:
Filecoin 5: 0 FIL (0ops) (f1kcfs7tin6yevdt3bbhtfr4x5sdlfheimfikcpdy on 44'/461'/4'/0/0) #4 js:2:filecoin:f1kcfs7tin6yevdt3bbhtfr4x5sdlfheimfikcpdy:
necessary accounts resynced in 3.12ms
▬ Filecoin 0.22.5 on nanoS 2.1.0
→ FROM Filecoin 2: 0.12075 FIL (61ops) (f154ruht7usm2dr2c2bezsmqepesdaum2nyjaacei on 44'/461'/1'/0/0) #1 js:2:filecoin:f154ruht7usm2dr2c2bezsmqepesdaum2nyjaacei: (! sum of ops 0.126663138265059395 FIL)
max spendable ~0.12075
★ using mutation 'Send 50%~'
→ TO Filecoin 3: 0.12426 FIL (35ops) (f1j3fqrrqsxqfwnzowmhe3ljarl34t6cni3aotlai on 44'/461'/2'/0/0) #2 js:2:filecoin:f1j3fqrrqsxqfwnzowmhe3ljarl34t6cni3aotlai:
✔️ transaction 
SEND  0.058483468060940334 FIL
TO f1j3fqrrqsxqfwnzowmhe3ljarl34t6cni3aotlai
STATUS (397ms)
  amount: 0.058483468060940334 FIL
  estimated fees: 0.00022334652893475 FIL
  total spent: 0.058706814589875084 FIL
✔️ has been signed! (2542ms) 
✔️ broadcasted! (206ms) optimistic operation: 
  -0.058483468060940334 FIL OUT        bafy2bzacedvzppl7nzhmvoo5nqhsm65ms5yhwvlvfcwaxmgsqwocgk32cmhws 2022-08-24T07:56
✔️ operation confirmed (3min 41s): 
  -0.05848346806094033 FIL OUT        bafy2bzacedvzppl7nzhmvoo5nqhsm65ms5yhwvlvfcwaxmgsqwocgk32cmhws 2022-08-24T07:57
✔️ Filecoin 2: 0.06211 FIL (62ops) (f154ruht7usm2dr2c2bezsmqepesdaum2nyjaacei on 44'/461'/1'/0/0) #1 js:2:filecoin:f154ruht7usm2dr2c2bezsmqepesdaum2nyjaacei: (! sum of ops 0.068179670204119065 FIL)
(final state reached in 3min 41s)

necessary accounts resynced in 684ms
▬ Filecoin 0.22.5 on nanoS 2.1.0
→ FROM Filecoin 3: 0.18274 FIL (36ops) (f1j3fqrrqsxqfwnzowmhe3ljarl34t6cni3aotlai on 44'/461'/2'/0/0) #2 js:2:filecoin:f1j3fqrrqsxqfwnzowmhe3ljarl34t6cni3aotlai: (! sum of ops 0.184952711327694434 FIL)
max spendable ~0.18274
★ using mutation 'Transfer Max'
→ TO Filecoin 2: 0.06211 FIL (62ops) (f154ruht7usm2dr2c2bezsmqepesdaum2nyjaacei on 44'/461'/1'/0/0) #1 js:2:filecoin:f154ruht7usm2dr2c2bezsmqepesdaum2nyjaacei:
✔️ transaction 
SEND MAX
TO f154ruht7usm2dr2c2bezsmqepesdaum2nyjaacei
STATUS (549ms)
  amount: 0.182554463806566762 FIL
  estimated fees: 0.000189448405956485 FIL
  total spent: 0.182743912212523247 FIL
✔️ has been signed! (2454ms) 
✔️ broadcasted! (408ms) optimistic operation: 
  -0.182554463806566762 FIL OUT        bafy2bzacech42fm4odjikbtwykpoyr5w6nzytk4gsioinqqurwunpsq7xmyhq 2022-08-24T08:00
✔️ operation confirmed (3min 1s): 
  -0.18255446380656676 FIL OUT        bafy2bzacech42fm4odjikbtwykpoyr5w6nzytk4gsioinqqurwunpsq7xmyhq 2022-08-24T08:00
✔️ Filecoin 3: 0.00007318 FIL (37ops) (f1j3fqrrqsxqfwnzowmhe3ljarl34t6cni3aotlai on 44'/461'/2'/0/0) #2 js:2:filecoin:f1j3fqrrqsxqfwnzowmhe3ljarl34t6cni3aotlai: (! sum of ops 0.002398247521127674 FIL)
(final state reached in 3min 1s)


Portfolio ($3.04) – Details of the 1 currencies
Spec (accounts) Operations Balance funds?
Filecoin (3) 139 (+4) 0.4872 FIL (- 0.00027863) ($3.04) 💪 f1uxfmur64lbpcblhw7mlmi3s7ocii33e5niv4gda
Performance ⏲ 7min 6s
  • total currency preload: 1.96ms
  • total scan accounts: 6.9s
  • in accounts resync: 1488ms
  • in transaction status: 946ms
  • in signOperation: 5s
  • in broadcast: 614ms
  • in operation confirmation: 6min 42s

Please sign in to comment.