@ledgerhq/live-common 31.6.0 → 31.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/account/helpers.d.ts.map +1 -1
- package/lib/account/helpers.js +0 -5
- package/lib/account/helpers.js.map +1 -1
- package/lib/bot/engine.d.ts.map +1 -1
- package/lib/bot/engine.js +6 -0
- package/lib/bot/engine.js.map +1 -1
- package/lib/config/defaultConfig.js +1 -1
- package/lib/config/defaultConfig.js.map +1 -1
- package/lib/cross.d.ts +6 -1
- package/lib/cross.d.ts.map +1 -1
- package/lib/cross.js +12 -2
- package/lib/cross.js.map +1 -1
- package/lib/cross.test.js +7 -0
- package/lib/cross.test.js.map +1 -1
- package/lib/exchange/swap/api/v5/__tests__/fetchCurrencyFrom.spec.js +3 -2
- package/lib/exchange/swap/api/v5/__tests__/fetchCurrencyFrom.spec.js.map +1 -1
- package/lib/exchange/swap/api/v5/__tests__/fetchCurrencyTo.spec.js +5 -4
- package/lib/exchange/swap/api/v5/__tests__/fetchCurrencyTo.spec.js.map +1 -1
- package/lib/exchange/swap/api/v5/fetchCurrencyFrom.d.ts +1 -1
- package/lib/exchange/swap/api/v5/fetchCurrencyFrom.d.ts.map +1 -1
- package/lib/exchange/swap/api/v5/fetchCurrencyFrom.js +5 -3
- package/lib/exchange/swap/api/v5/fetchCurrencyFrom.js.map +1 -1
- package/lib/exchange/swap/api/v5/fetchCurrencyTo.d.ts +2 -2
- package/lib/exchange/swap/api/v5/fetchCurrencyTo.d.ts.map +1 -1
- package/lib/exchange/swap/api/v5/fetchCurrencyTo.js +7 -5
- package/lib/exchange/swap/api/v5/fetchCurrencyTo.js.map +1 -1
- package/lib/exchange/swap/api/v5/fetchRates.d.ts +10 -0
- package/lib/exchange/swap/api/v5/fetchRates.d.ts.map +1 -0
- package/lib/exchange/swap/api/v5/fetchRates.js +53 -0
- package/lib/exchange/swap/api/v5/fetchRates.js.map +1 -0
- package/lib/exchange/swap/completeExchange.d.ts.map +1 -1
- package/lib/exchange/swap/completeExchange.js +2 -1
- package/lib/exchange/swap/completeExchange.js.map +1 -1
- package/lib/exchange/swap/hooks/v5/useFetchCurrencyFrom.d.ts +13 -0
- package/lib/exchange/swap/hooks/v5/useFetchCurrencyFrom.d.ts.map +1 -0
- package/lib/exchange/swap/hooks/v5/useFetchCurrencyFrom.js +21 -0
- package/lib/exchange/swap/hooks/v5/useFetchCurrencyFrom.js.map +1 -0
- package/lib/exchange/swap/hooks/v5/useFetchCurrencyTo.d.ts +13 -0
- package/lib/exchange/swap/hooks/v5/useFetchCurrencyTo.d.ts.map +1 -0
- package/lib/exchange/swap/hooks/v5/useFetchCurrencyTo.js +25 -0
- package/lib/exchange/swap/hooks/v5/useFetchCurrencyTo.js.map +1 -0
- package/lib/exchange/swap/hooks/v5/useFetchRates.d.ts +18 -0
- package/lib/exchange/swap/hooks/v5/useFetchRates.d.ts.map +1 -0
- package/lib/exchange/swap/hooks/v5/useFetchRates.js +28 -0
- package/lib/exchange/swap/hooks/v5/useFetchRates.js.map +1 -0
- package/lib/exchange/swap/types.d.ts +24 -0
- package/lib/exchange/swap/types.d.ts.map +1 -1
- package/lib/exchange/swap/utils/flattenV5CurrenciesToAndFrom.d.ts +4 -0
- package/lib/exchange/swap/utils/flattenV5CurrenciesToAndFrom.d.ts.map +1 -0
- package/lib/exchange/swap/utils/flattenV5CurrenciesToAndFrom.js +9 -0
- package/lib/exchange/swap/utils/flattenV5CurrenciesToAndFrom.js.map +1 -0
- package/lib/exchange/swap/webApp/index.d.ts +2 -0
- package/lib/exchange/swap/webApp/index.d.ts.map +1 -0
- package/lib/exchange/swap/webApp/index.js +18 -0
- package/lib/exchange/swap/webApp/index.js.map +1 -0
- package/lib/exchange/swap/webApp/utils.d.ts +31 -0
- package/lib/exchange/swap/webApp/utils.d.ts.map +1 -0
- package/lib/exchange/swap/webApp/utils.js +43 -0
- package/lib/exchange/swap/webApp/utils.js.map +1 -0
- package/lib/families/cosmos/account.js +8 -8
- package/lib/families/cosmos/account.js.map +1 -1
- package/lib/families/cosmos/api/Cosmos.d.ts +4 -0
- package/lib/families/cosmos/api/Cosmos.d.ts.map +1 -1
- package/lib/families/cosmos/api/Cosmos.js +3 -1
- package/lib/families/cosmos/api/Cosmos.js.map +1 -1
- package/lib/families/cosmos/banner.test.js +1 -0
- package/lib/families/cosmos/banner.test.js.map +1 -1
- package/lib/families/cosmos/chain/Osmosis.d.ts.map +1 -1
- package/lib/families/cosmos/chain/Osmosis.js +0 -2
- package/lib/families/cosmos/chain/Osmosis.js.map +1 -1
- package/lib/families/cosmos/chain/cosmosBase.d.ts +0 -2
- package/lib/families/cosmos/chain/cosmosBase.d.ts.map +1 -1
- package/lib/families/cosmos/chain/cosmosBase.js +0 -2
- package/lib/families/cosmos/chain/cosmosBase.js.map +1 -1
- package/lib/families/cosmos/datasets/cosmos.d.ts.map +1 -1
- package/lib/families/cosmos/datasets/cosmos.js +15 -13
- package/lib/families/cosmos/datasets/cosmos.js.map +1 -1
- package/lib/families/cosmos/js-synchronisation.d.ts.map +1 -1
- package/lib/families/cosmos/js-synchronisation.js +2 -1
- package/lib/families/cosmos/js-synchronisation.js.map +1 -1
- package/lib/families/cosmos/js-synchronisation.unit.test.js +1 -0
- package/lib/families/cosmos/js-synchronisation.unit.test.js.map +1 -1
- package/lib/families/cosmos/mock.d.ts.map +1 -1
- package/lib/families/cosmos/mock.js +6 -0
- package/lib/families/cosmos/mock.js.map +1 -1
- package/lib/families/cosmos/serialization.d.ts.map +1 -1
- package/lib/families/cosmos/serialization.js +4 -2
- package/lib/families/cosmos/serialization.js.map +1 -1
- package/lib/families/cosmos/specs.d.ts +45 -33
- package/lib/families/cosmos/specs.d.ts.map +1 -1
- package/lib/families/cosmos/specs.js +102 -41
- package/lib/families/cosmos/specs.js.map +1 -1
- package/lib/families/cosmos/types.d.ts +2 -0
- package/lib/families/cosmos/types.d.ts.map +1 -1
- package/lib/families/elrond/specs.d.ts.map +1 -1
- package/lib/families/elrond/specs.js.map +1 -1
- package/lib/families/polkadot/bridge/mock.d.ts.map +1 -1
- package/lib/families/polkadot/bridge/mock.js +105 -102
- package/lib/families/polkadot/bridge/mock.js.map +1 -1
- package/lib/generated/specs.d.ts +44 -33
- package/lib/generated/specs.d.ts.map +1 -1
- package/lib/hooks/useAPI.d.ts +20 -0
- package/lib/hooks/useAPI.d.ts.map +1 -0
- package/lib/hooks/useAPI.js +62 -0
- package/lib/hooks/useAPI.js.map +1 -0
- package/lib/mock/account.d.ts.map +1 -1
- package/lib/mock/account.js +1 -0
- package/lib/mock/account.js.map +1 -1
- package/lib-es/account/helpers.d.ts.map +1 -1
- package/lib-es/account/helpers.js +0 -5
- package/lib-es/account/helpers.js.map +1 -1
- package/lib-es/bot/engine.d.ts.map +1 -1
- package/lib-es/bot/engine.js +6 -0
- package/lib-es/bot/engine.js.map +1 -1
- package/lib-es/config/defaultConfig.js +1 -1
- package/lib-es/config/defaultConfig.js.map +1 -1
- package/lib-es/cross.d.ts +6 -1
- package/lib-es/cross.d.ts.map +1 -1
- package/lib-es/cross.js +12 -2
- package/lib-es/cross.js.map +1 -1
- package/lib-es/cross.test.js +7 -0
- package/lib-es/cross.test.js.map +1 -1
- package/lib-es/exchange/swap/api/v5/__tests__/fetchCurrencyFrom.spec.js +3 -2
- package/lib-es/exchange/swap/api/v5/__tests__/fetchCurrencyFrom.spec.js.map +1 -1
- package/lib-es/exchange/swap/api/v5/__tests__/fetchCurrencyTo.spec.js +5 -4
- package/lib-es/exchange/swap/api/v5/__tests__/fetchCurrencyTo.spec.js.map +1 -1
- package/lib-es/exchange/swap/api/v5/fetchCurrencyFrom.d.ts +1 -1
- package/lib-es/exchange/swap/api/v5/fetchCurrencyFrom.d.ts.map +1 -1
- package/lib-es/exchange/swap/api/v5/fetchCurrencyFrom.js +5 -3
- package/lib-es/exchange/swap/api/v5/fetchCurrencyFrom.js.map +1 -1
- package/lib-es/exchange/swap/api/v5/fetchCurrencyTo.d.ts +2 -2
- package/lib-es/exchange/swap/api/v5/fetchCurrencyTo.d.ts.map +1 -1
- package/lib-es/exchange/swap/api/v5/fetchCurrencyTo.js +7 -5
- package/lib-es/exchange/swap/api/v5/fetchCurrencyTo.js.map +1 -1
- package/lib-es/exchange/swap/api/v5/fetchRates.d.ts +10 -0
- package/lib-es/exchange/swap/api/v5/fetchRates.d.ts.map +1 -0
- package/lib-es/exchange/swap/api/v5/fetchRates.js +46 -0
- package/lib-es/exchange/swap/api/v5/fetchRates.js.map +1 -0
- package/lib-es/exchange/swap/completeExchange.d.ts.map +1 -1
- package/lib-es/exchange/swap/completeExchange.js +2 -1
- package/lib-es/exchange/swap/completeExchange.js.map +1 -1
- package/lib-es/exchange/swap/hooks/v5/useFetchCurrencyFrom.d.ts +13 -0
- package/lib-es/exchange/swap/hooks/v5/useFetchCurrencyFrom.d.ts.map +1 -0
- package/lib-es/exchange/swap/hooks/v5/useFetchCurrencyFrom.js +17 -0
- package/lib-es/exchange/swap/hooks/v5/useFetchCurrencyFrom.js.map +1 -0
- package/lib-es/exchange/swap/hooks/v5/useFetchCurrencyTo.d.ts +13 -0
- package/lib-es/exchange/swap/hooks/v5/useFetchCurrencyTo.d.ts.map +1 -0
- package/lib-es/exchange/swap/hooks/v5/useFetchCurrencyTo.js +21 -0
- package/lib-es/exchange/swap/hooks/v5/useFetchCurrencyTo.js.map +1 -0
- package/lib-es/exchange/swap/hooks/v5/useFetchRates.d.ts +18 -0
- package/lib-es/exchange/swap/hooks/v5/useFetchRates.d.ts.map +1 -0
- package/lib-es/exchange/swap/hooks/v5/useFetchRates.js +24 -0
- package/lib-es/exchange/swap/hooks/v5/useFetchRates.js.map +1 -0
- package/lib-es/exchange/swap/types.d.ts +24 -0
- package/lib-es/exchange/swap/types.d.ts.map +1 -1
- package/lib-es/exchange/swap/utils/flattenV5CurrenciesToAndFrom.d.ts +4 -0
- package/lib-es/exchange/swap/utils/flattenV5CurrenciesToAndFrom.d.ts.map +1 -0
- package/lib-es/exchange/swap/utils/flattenV5CurrenciesToAndFrom.js +5 -0
- package/lib-es/exchange/swap/utils/flattenV5CurrenciesToAndFrom.js.map +1 -0
- package/lib-es/exchange/swap/webApp/index.d.ts +2 -0
- package/lib-es/exchange/swap/webApp/index.d.ts.map +1 -0
- package/lib-es/exchange/swap/webApp/index.js +2 -0
- package/lib-es/exchange/swap/webApp/index.js.map +1 -0
- package/lib-es/exchange/swap/webApp/utils.d.ts +31 -0
- package/lib-es/exchange/swap/webApp/utils.d.ts.map +1 -0
- package/lib-es/exchange/swap/webApp/utils.js +38 -0
- package/lib-es/exchange/swap/webApp/utils.js.map +1 -0
- package/lib-es/families/cosmos/account.js +8 -8
- package/lib-es/families/cosmos/account.js.map +1 -1
- package/lib-es/families/cosmos/api/Cosmos.d.ts +4 -0
- package/lib-es/families/cosmos/api/Cosmos.d.ts.map +1 -1
- package/lib-es/families/cosmos/api/Cosmos.js +3 -1
- package/lib-es/families/cosmos/api/Cosmos.js.map +1 -1
- package/lib-es/families/cosmos/banner.test.js +1 -0
- package/lib-es/families/cosmos/banner.test.js.map +1 -1
- package/lib-es/families/cosmos/chain/Osmosis.d.ts.map +1 -1
- package/lib-es/families/cosmos/chain/Osmosis.js +0 -2
- package/lib-es/families/cosmos/chain/Osmosis.js.map +1 -1
- package/lib-es/families/cosmos/chain/cosmosBase.d.ts +0 -2
- package/lib-es/families/cosmos/chain/cosmosBase.d.ts.map +1 -1
- package/lib-es/families/cosmos/chain/cosmosBase.js +0 -2
- package/lib-es/families/cosmos/chain/cosmosBase.js.map +1 -1
- package/lib-es/families/cosmos/datasets/cosmos.d.ts.map +1 -1
- package/lib-es/families/cosmos/datasets/cosmos.js +15 -13
- package/lib-es/families/cosmos/datasets/cosmos.js.map +1 -1
- package/lib-es/families/cosmos/js-synchronisation.d.ts.map +1 -1
- package/lib-es/families/cosmos/js-synchronisation.js +2 -1
- package/lib-es/families/cosmos/js-synchronisation.js.map +1 -1
- package/lib-es/families/cosmos/js-synchronisation.unit.test.js +1 -0
- package/lib-es/families/cosmos/js-synchronisation.unit.test.js.map +1 -1
- package/lib-es/families/cosmos/mock.d.ts.map +1 -1
- package/lib-es/families/cosmos/mock.js +6 -0
- package/lib-es/families/cosmos/mock.js.map +1 -1
- package/lib-es/families/cosmos/serialization.d.ts.map +1 -1
- package/lib-es/families/cosmos/serialization.js +4 -2
- package/lib-es/families/cosmos/serialization.js.map +1 -1
- package/lib-es/families/cosmos/specs.d.ts +45 -33
- package/lib-es/families/cosmos/specs.d.ts.map +1 -1
- package/lib-es/families/cosmos/specs.js +102 -41
- package/lib-es/families/cosmos/specs.js.map +1 -1
- package/lib-es/families/cosmos/types.d.ts +2 -0
- package/lib-es/families/cosmos/types.d.ts.map +1 -1
- package/lib-es/families/elrond/specs.d.ts.map +1 -1
- package/lib-es/families/elrond/specs.js.map +1 -1
- package/lib-es/families/polkadot/bridge/mock.d.ts.map +1 -1
- package/lib-es/families/polkadot/bridge/mock.js +106 -103
- package/lib-es/families/polkadot/bridge/mock.js.map +1 -1
- package/lib-es/generated/specs.d.ts +44 -33
- package/lib-es/generated/specs.d.ts.map +1 -1
- package/lib-es/hooks/useAPI.d.ts +20 -0
- package/lib-es/hooks/useAPI.d.ts.map +1 -0
- package/lib-es/hooks/useAPI.js +58 -0
- package/lib-es/hooks/useAPI.js.map +1 -0
- package/lib-es/mock/account.d.ts.map +1 -1
- package/lib-es/mock/account.js +1 -0
- package/lib-es/mock/account.js.map +1 -1
- package/package.json +12 -12
- package/src/__snapshots__/cross.test.ts.snap +2 -0
- package/src/account/helpers.ts +0 -6
- package/src/bot/engine.ts +6 -0
- package/src/config/defaultConfig.ts +1 -1
- package/src/cross.test.ts +7 -0
- package/src/cross.ts +26 -2
- package/src/exchange/swap/api/v5/__tests__/fetchCurrencyFrom.spec.ts +3 -2
- package/src/exchange/swap/api/v5/__tests__/fetchCurrencyTo.spec.ts +5 -4
- package/src/exchange/swap/api/v5/fetchCurrencyFrom.ts +5 -3
- package/src/exchange/swap/api/v5/fetchCurrencyTo.ts +8 -5
- package/src/exchange/swap/api/v5/fetchRates.ts +48 -0
- package/src/exchange/swap/completeExchange.ts +2 -1
- package/src/exchange/swap/hooks/v5/useFetchCurrencyFrom.ts +23 -0
- package/src/exchange/swap/hooks/v5/useFetchCurrencyTo.ts +28 -0
- package/src/exchange/swap/hooks/v5/useFetchRates.ts +41 -0
- package/src/exchange/swap/types.ts +29 -0
- package/src/exchange/swap/utils/flattenV5CurrenciesToAndFrom.ts +7 -0
- package/src/exchange/swap/webApp/index.ts +1 -0
- package/src/exchange/swap/webApp/utils.ts +41 -0
- package/src/families/cosmos/account.ts +8 -8
- package/src/families/cosmos/api/Cosmos.ts +21 -10
- package/src/families/cosmos/banner.test.ts +1 -0
- package/src/families/cosmos/chain/Osmosis.ts +0 -2
- package/src/families/cosmos/chain/cosmosBase.ts +0 -3
- package/src/families/cosmos/datasets/__snapshots__/coreum.integration.test.ts.snap +0 -3
- package/src/families/cosmos/datasets/__snapshots__/cosmos.integration.test.ts.snap +259 -354
- package/src/families/cosmos/datasets/__snapshots__/onomy.integration.test.ts.snap +1 -235
- package/src/families/cosmos/datasets/cosmos.ts +15 -13
- package/src/families/cosmos/js-synchronisation.ts +11 -2
- package/src/families/cosmos/js-synchronisation.unit.test.ts +1 -0
- package/src/families/cosmos/mock.ts +6 -0
- package/src/families/cosmos/serialization.ts +4 -0
- package/src/families/cosmos/specs.ts +113 -54
- package/src/families/cosmos/types.ts +2 -0
- package/src/families/elrond/specs.ts +0 -1
- package/src/families/polkadot/bridge/mock.ts +109 -103
- package/src/hooks/useAPI.ts +81 -0
- package/src/mock/account.ts +1 -0
|
@@ -59,241 +59,7 @@ Array [
|
|
|
59
59
|
|
|
60
60
|
exports[`onomy currency bridge scanAccounts onomy seed 1 2`] = `
|
|
61
61
|
Array [
|
|
62
|
-
Array [
|
|
63
|
-
Object {
|
|
64
|
-
"accountId": "js:2:onomy:onomy1gyauvl44q2apn3u3aujm36q8zrj74vry0e2p7v:",
|
|
65
|
-
"blockHash": null,
|
|
66
|
-
"blockHeight": "2156456",
|
|
67
|
-
"contract": undefined,
|
|
68
|
-
"extra": Object {
|
|
69
|
-
"memo": "Ledger Live",
|
|
70
|
-
"sourceValidator": "onomyvaloper1a80f2tudr06k6jtg8yhgrq4and80slljnf64dy",
|
|
71
|
-
"validators": Array [
|
|
72
|
-
Object {
|
|
73
|
-
"address": "onomyvaloper1fewecfptznhtdvxe5sqw2m6axyes6kst384lhc",
|
|
74
|
-
"amount": "150371403031229257",
|
|
75
|
-
},
|
|
76
|
-
],
|
|
77
|
-
},
|
|
78
|
-
"fee": "771",
|
|
79
|
-
"hash": "09EEB242228373B05A43EE0AF4EB82374835F9F902BD74DA1B53A0C9225E4BBE",
|
|
80
|
-
"id": "js:2:onomy:onomy1gyauvl44q2apn3u3aujm36q8zrj74vry0e2p7v:-09EEB242228373B05A43EE0AF4EB82374835F9F902BD74DA1B53A0C9225E4BBE-REDELEGATE",
|
|
81
|
-
"operator": undefined,
|
|
82
|
-
"recipients": Array [],
|
|
83
|
-
"senders": Array [],
|
|
84
|
-
"standard": undefined,
|
|
85
|
-
"tokenId": undefined,
|
|
86
|
-
"transactionSequenceNumber": 7,
|
|
87
|
-
"type": "REDELEGATE",
|
|
88
|
-
"value": "771",
|
|
89
|
-
},
|
|
90
|
-
Object {
|
|
91
|
-
"accountId": "js:2:onomy:onomy1gyauvl44q2apn3u3aujm36q8zrj74vry0e2p7v:",
|
|
92
|
-
"blockHash": null,
|
|
93
|
-
"blockHeight": "2110785",
|
|
94
|
-
"contract": undefined,
|
|
95
|
-
"extra": Object {
|
|
96
|
-
"memo": "for testing",
|
|
97
|
-
"validators": Array [],
|
|
98
|
-
},
|
|
99
|
-
"fee": "210",
|
|
100
|
-
"hash": "0D657F72BCFBE4A9A36F81C9F62363D4471548A8B2F2EBD9D830C75BDDFABC8F",
|
|
101
|
-
"id": "js:2:onomy:onomy1gyauvl44q2apn3u3aujm36q8zrj74vry0e2p7v:-0D657F72BCFBE4A9A36F81C9F62363D4471548A8B2F2EBD9D830C75BDDFABC8F-IN",
|
|
102
|
-
"operator": undefined,
|
|
103
|
-
"recipients": Array [
|
|
104
|
-
"onomy1gyauvl44q2apn3u3aujm36q8zrj74vry0e2p7v",
|
|
105
|
-
],
|
|
106
|
-
"senders": Array [
|
|
107
|
-
"onomy103h9fdkgm7ucccujyunck5lfejrvthd7drnpnq",
|
|
108
|
-
],
|
|
109
|
-
"standard": undefined,
|
|
110
|
-
"tokenId": undefined,
|
|
111
|
-
"transactionSequenceNumber": 2,
|
|
112
|
-
"type": "IN",
|
|
113
|
-
"value": "5000000000000000000",
|
|
114
|
-
},
|
|
115
|
-
Object {
|
|
116
|
-
"accountId": "js:2:onomy:onomy1gyauvl44q2apn3u3aujm36q8zrj74vry0e2p7v:",
|
|
117
|
-
"blockHash": null,
|
|
118
|
-
"blockHeight": "2156443",
|
|
119
|
-
"contract": undefined,
|
|
120
|
-
"extra": Object {
|
|
121
|
-
"memo": "",
|
|
122
|
-
"validators": Array [],
|
|
123
|
-
},
|
|
124
|
-
"fee": "187",
|
|
125
|
-
"hash": "418B01CFDA1A43DB2548F8BD51C07817E0C9CE0B6EFE3A1F2D3A4A7EC7506E31",
|
|
126
|
-
"id": "js:2:onomy:onomy1gyauvl44q2apn3u3aujm36q8zrj74vry0e2p7v:-418B01CFDA1A43DB2548F8BD51C07817E0C9CE0B6EFE3A1F2D3A4A7EC7506E31-OUT",
|
|
127
|
-
"operator": undefined,
|
|
128
|
-
"recipients": Array [
|
|
129
|
-
"onomy1g84934jpu3v5de5yqukkkhxmcvsw3u2ag8chu6",
|
|
130
|
-
],
|
|
131
|
-
"senders": Array [
|
|
132
|
-
"onomy1gyauvl44q2apn3u3aujm36q8zrj74vry0e2p7v",
|
|
133
|
-
],
|
|
134
|
-
"standard": undefined,
|
|
135
|
-
"tokenId": undefined,
|
|
136
|
-
"transactionSequenceNumber": 4,
|
|
137
|
-
"type": "OUT",
|
|
138
|
-
"value": "100000000000000187",
|
|
139
|
-
},
|
|
140
|
-
Object {
|
|
141
|
-
"accountId": "js:2:onomy:onomy1gyauvl44q2apn3u3aujm36q8zrj74vry0e2p7v:",
|
|
142
|
-
"blockHash": null,
|
|
143
|
-
"blockHeight": "2142649",
|
|
144
|
-
"contract": undefined,
|
|
145
|
-
"extra": Object {
|
|
146
|
-
"memo": "Ledger Live",
|
|
147
|
-
"validators": Array [
|
|
148
|
-
Object {
|
|
149
|
-
"address": "onomyvaloper1fewecfptznhtdvxe5sqw2m6axyes6kst384lhc",
|
|
150
|
-
"amount": "150000000000000000",
|
|
151
|
-
},
|
|
152
|
-
],
|
|
153
|
-
},
|
|
154
|
-
"fee": "478",
|
|
155
|
-
"hash": "4C2A3CD1C32BDCC92DB051C92CB8A1FCA3FD144D7ABAD0E87C8C6CC9A3D530AB",
|
|
156
|
-
"id": "js:2:onomy:onomy1gyauvl44q2apn3u3aujm36q8zrj74vry0e2p7v:-4C2A3CD1C32BDCC92DB051C92CB8A1FCA3FD144D7ABAD0E87C8C6CC9A3D530AB-UNDELEGATE",
|
|
157
|
-
"operator": undefined,
|
|
158
|
-
"recipients": Array [],
|
|
159
|
-
"senders": Array [],
|
|
160
|
-
"standard": undefined,
|
|
161
|
-
"tokenId": undefined,
|
|
162
|
-
"transactionSequenceNumber": 2,
|
|
163
|
-
"type": "UNDELEGATE",
|
|
164
|
-
"value": "478",
|
|
165
|
-
},
|
|
166
|
-
Object {
|
|
167
|
-
"accountId": "js:2:onomy:onomy1gyauvl44q2apn3u3aujm36q8zrj74vry0e2p7v:",
|
|
168
|
-
"blockHash": null,
|
|
169
|
-
"blockHeight": "2156452",
|
|
170
|
-
"contract": undefined,
|
|
171
|
-
"extra": Object {
|
|
172
|
-
"memo": "Ledger Live",
|
|
173
|
-
"validators": Array [
|
|
174
|
-
Object {
|
|
175
|
-
"address": "onomyvaloper1a80f2tudr06k6jtg8yhgrq4and80slljnf64dy",
|
|
176
|
-
"amount": "1485612124917028",
|
|
177
|
-
},
|
|
178
|
-
],
|
|
179
|
-
},
|
|
180
|
-
"fee": "568",
|
|
181
|
-
"hash": "97595388CE87CF3EEEEA562A522508F69B6F14CCAE2B29BB1929880BF65D05B9",
|
|
182
|
-
"id": "js:2:onomy:onomy1gyauvl44q2apn3u3aujm36q8zrj74vry0e2p7v:-97595388CE87CF3EEEEA562A522508F69B6F14CCAE2B29BB1929880BF65D05B9-DELEGATE",
|
|
183
|
-
"operator": undefined,
|
|
184
|
-
"recipients": Array [],
|
|
185
|
-
"senders": Array [],
|
|
186
|
-
"standard": undefined,
|
|
187
|
-
"tokenId": undefined,
|
|
188
|
-
"transactionSequenceNumber": 6,
|
|
189
|
-
"type": "DELEGATE",
|
|
190
|
-
"value": "568",
|
|
191
|
-
},
|
|
192
|
-
Object {
|
|
193
|
-
"accountId": "js:2:onomy:onomy1gyauvl44q2apn3u3aujm36q8zrj74vry0e2p7v:",
|
|
194
|
-
"blockHash": null,
|
|
195
|
-
"blockHeight": "2142645",
|
|
196
|
-
"contract": undefined,
|
|
197
|
-
"extra": Object {
|
|
198
|
-
"memo": "Ledger Live",
|
|
199
|
-
"sourceValidator": "onomyvaloper1a80f2tudr06k6jtg8yhgrq4and80slljnf64dy",
|
|
200
|
-
"validators": Array [
|
|
201
|
-
Object {
|
|
202
|
-
"address": "onomyvaloper1fewecfptznhtdvxe5sqw2m6axyes6kst384lhc",
|
|
203
|
-
"amount": "600000000000000000",
|
|
204
|
-
},
|
|
205
|
-
],
|
|
206
|
-
},
|
|
207
|
-
"fee": "609",
|
|
208
|
-
"hash": "A514A61B266FCBCA83EA93D15CF8451733853CD3F0ACD9817D1AA6E4377160D8",
|
|
209
|
-
"id": "js:2:onomy:onomy1gyauvl44q2apn3u3aujm36q8zrj74vry0e2p7v:-A514A61B266FCBCA83EA93D15CF8451733853CD3F0ACD9817D1AA6E4377160D8-REDELEGATE",
|
|
210
|
-
"operator": undefined,
|
|
211
|
-
"recipients": Array [],
|
|
212
|
-
"senders": Array [],
|
|
213
|
-
"standard": undefined,
|
|
214
|
-
"tokenId": undefined,
|
|
215
|
-
"transactionSequenceNumber": 1,
|
|
216
|
-
"type": "REDELEGATE",
|
|
217
|
-
"value": "609",
|
|
218
|
-
},
|
|
219
|
-
Object {
|
|
220
|
-
"accountId": "js:2:onomy:onomy1gyauvl44q2apn3u3aujm36q8zrj74vry0e2p7v:",
|
|
221
|
-
"blockHash": null,
|
|
222
|
-
"blockHeight": "2113560",
|
|
223
|
-
"contract": undefined,
|
|
224
|
-
"extra": Object {
|
|
225
|
-
"memo": "Ledger Live",
|
|
226
|
-
"validators": Array [
|
|
227
|
-
Object {
|
|
228
|
-
"address": "onomyvaloper1a80f2tudr06k6jtg8yhgrq4and80slljnf64dy",
|
|
229
|
-
"amount": "1200000000000000000",
|
|
230
|
-
},
|
|
231
|
-
],
|
|
232
|
-
},
|
|
233
|
-
"fee": "359",
|
|
234
|
-
"hash": "C130D8617876D82E6A73D04E77B6B4C2B348FB137F53AB15F33BC16190FCAD0F",
|
|
235
|
-
"id": "js:2:onomy:onomy1gyauvl44q2apn3u3aujm36q8zrj74vry0e2p7v:-C130D8617876D82E6A73D04E77B6B4C2B348FB137F53AB15F33BC16190FCAD0F-DELEGATE",
|
|
236
|
-
"operator": undefined,
|
|
237
|
-
"recipients": Array [],
|
|
238
|
-
"senders": Array [],
|
|
239
|
-
"standard": undefined,
|
|
240
|
-
"tokenId": undefined,
|
|
241
|
-
"transactionSequenceNumber": 0,
|
|
242
|
-
"type": "DELEGATE",
|
|
243
|
-
"value": "359",
|
|
244
|
-
},
|
|
245
|
-
Object {
|
|
246
|
-
"accountId": "js:2:onomy:onomy1gyauvl44q2apn3u3aujm36q8zrj74vry0e2p7v:",
|
|
247
|
-
"blockHash": null,
|
|
248
|
-
"blockHeight": "2142966",
|
|
249
|
-
"contract": undefined,
|
|
250
|
-
"extra": Object {
|
|
251
|
-
"memo": "",
|
|
252
|
-
"validators": Array [],
|
|
253
|
-
},
|
|
254
|
-
"fee": "209",
|
|
255
|
-
"hash": "DF9F11244BF870C0FD832FFB929300505B396E8AE1C19BE1BC69812312A06CDE",
|
|
256
|
-
"id": "js:2:onomy:onomy1gyauvl44q2apn3u3aujm36q8zrj74vry0e2p7v:-DF9F11244BF870C0FD832FFB929300505B396E8AE1C19BE1BC69812312A06CDE-OUT",
|
|
257
|
-
"operator": undefined,
|
|
258
|
-
"recipients": Array [
|
|
259
|
-
"onomy1rs97j43nfyvc689y5rjvnnhrq3tes6ghpaunjg",
|
|
260
|
-
],
|
|
261
|
-
"senders": Array [
|
|
262
|
-
"onomy1gyauvl44q2apn3u3aujm36q8zrj74vry0e2p7v",
|
|
263
|
-
],
|
|
264
|
-
"standard": undefined,
|
|
265
|
-
"tokenId": undefined,
|
|
266
|
-
"transactionSequenceNumber": 3,
|
|
267
|
-
"type": "OUT",
|
|
268
|
-
"value": "1800000000000000209",
|
|
269
|
-
},
|
|
270
|
-
Object {
|
|
271
|
-
"accountId": "js:2:onomy:onomy1gyauvl44q2apn3u3aujm36q8zrj74vry0e2p7v:",
|
|
272
|
-
"blockHash": null,
|
|
273
|
-
"blockHeight": "2156447",
|
|
274
|
-
"contract": undefined,
|
|
275
|
-
"extra": Object {
|
|
276
|
-
"memo": "Ledger Live",
|
|
277
|
-
"validators": Array [
|
|
278
|
-
Object {
|
|
279
|
-
"address": "onomyvaloper1fewecfptznhtdvxe5sqw2m6axyes6kst384lhc",
|
|
280
|
-
"amount": "1112911633432837",
|
|
281
|
-
},
|
|
282
|
-
],
|
|
283
|
-
},
|
|
284
|
-
"fee": "590",
|
|
285
|
-
"hash": "E5B5E2B4205C55D4E6C5FCF744A69D8D42F12FB22341D385F8ACA909EC12F89C",
|
|
286
|
-
"id": "js:2:onomy:onomy1gyauvl44q2apn3u3aujm36q8zrj74vry0e2p7v:-E5B5E2B4205C55D4E6C5FCF744A69D8D42F12FB22341D385F8ACA909EC12F89C-DELEGATE",
|
|
287
|
-
"operator": undefined,
|
|
288
|
-
"recipients": Array [],
|
|
289
|
-
"senders": Array [],
|
|
290
|
-
"standard": undefined,
|
|
291
|
-
"tokenId": undefined,
|
|
292
|
-
"transactionSequenceNumber": 5,
|
|
293
|
-
"type": "DELEGATE",
|
|
294
|
-
"value": "590",
|
|
295
|
-
},
|
|
296
|
-
],
|
|
62
|
+
Array [],
|
|
297
63
|
Array [],
|
|
298
64
|
]
|
|
299
65
|
`;
|
|
@@ -17,19 +17,21 @@ const dataset: CurrenciesData<Transaction> = {
|
|
|
17
17
|
{
|
|
18
18
|
name: "cosmos seed 1",
|
|
19
19
|
apdus: `
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
20
|
+
=> 550400001b06636f736d6f732c00008076000080000000800000000000000000
|
|
21
|
+
<= 0388459b2653519948b12492f1a0b464720110c147a8155d23d423a5cc3c21d89a636f736d6f73316738343933346a70753376356465357971756b6b6b68786d63767377337532616a787670646c9000
|
|
22
|
+
=> 550400001b06636f736d6f732c00008076000080000000800000000000000000
|
|
23
|
+
<= 0388459b2653519948b12492f1a0b464720110c147a8155d23d423a5cc3c21d89a636f736d6f73316738343933346a70753376356465357971756b6b6b68786d63767377337532616a787670646c9000
|
|
24
|
+
=> 550400001b06636f736d6f732c00008076000080010000800000000000000000
|
|
25
|
+
<= 02624ac83690d5ef627927104767d679aef73d3d3c9544abe4206b1d0c463c94ff636f736d6f7331303875793571396a743539677775677135797264686b7a6364396a7279736c6d706373746b359000
|
|
26
|
+
=> 550400001b06636f736d6f732c00008076000080020000800000000000000000
|
|
27
|
+
<= 038ff98278402aa3e46ccfd020561dc9724ab63d7179ca507c8154b5257c7d5200636f736d6f733163676336393661793270673664346763656a656b3279386c6136366a376535793363376b79779000
|
|
28
|
+
=> 550400001b06636f736d6f732c00008076000080030000800000000000000000
|
|
29
|
+
<= 02ecca2a8c647b50bcea2cb4667bb8b2c5f5b2b8439d51c842bc9fd20c4185a95c636f736d6f73313474673476736430713734356678687a6e333239706b78306b727174737a6378797a6c356b759000
|
|
30
|
+
=> 550400001b06636f736d6f732c00008076000080040000800000000000000000
|
|
31
|
+
<= 03f9f9ddeefd1b762648af6b3ba3e14b0054d7137cf5ed67f501f01524a773c8d0636f736d6f733138713661643239346477357766376e7565713763746c656568786839666774386463656372399000
|
|
32
|
+
=> 550400001b06636f736d6f732c00008076000080050000800000000000000000
|
|
33
|
+
<= 03b036c68d156c82e550bf5c0b015313221d618cf4022b96d23f1b559b557ed3ef636f736d6f7331756833396a7830647661387570767171716836393072687432766e36387a7439776d6d6871349000
|
|
34
|
+
`,
|
|
33
35
|
},
|
|
34
36
|
],
|
|
35
37
|
accounts: [
|
|
@@ -178,8 +178,16 @@ export const getAccountShape: GetAccountShape = async info => {
|
|
|
178
178
|
derivationMode,
|
|
179
179
|
});
|
|
180
180
|
|
|
181
|
-
const {
|
|
182
|
-
|
|
181
|
+
const {
|
|
182
|
+
accountInfo,
|
|
183
|
+
balances,
|
|
184
|
+
blockHeight,
|
|
185
|
+
txs,
|
|
186
|
+
delegations,
|
|
187
|
+
redelegations,
|
|
188
|
+
unbondings,
|
|
189
|
+
withdrawAddress,
|
|
190
|
+
} = await new CosmosAPI(currency.id).getAccountInfo(address, currency);
|
|
183
191
|
const oldOperations = initialAccount?.operations || [];
|
|
184
192
|
const newOperations = txToOps(info, accountId, txs);
|
|
185
193
|
const operations = mergeOps(oldOperations, newOperations);
|
|
@@ -221,6 +229,7 @@ export const getAccountShape: GetAccountShape = async info => {
|
|
|
221
229
|
pendingRewardsBalance,
|
|
222
230
|
unbondingBalance,
|
|
223
231
|
withdrawAddress,
|
|
232
|
+
sequence: accountInfo.sequence,
|
|
224
233
|
},
|
|
225
234
|
};
|
|
226
235
|
|
|
@@ -34,6 +34,7 @@ function setCosmosResources(
|
|
|
34
34
|
withdrawAddress: account.id,
|
|
35
35
|
unbondings: unbondings ?? account.cosmosResources?.unbondings ?? [],
|
|
36
36
|
redelegations: redelegations ?? account.cosmosResources?.redelegations ?? [],
|
|
37
|
+
sequence: account.cosmosResources.sequence + 1,
|
|
37
38
|
};
|
|
38
39
|
return account;
|
|
39
40
|
}
|
|
@@ -94,6 +95,7 @@ function addDelegationOperation(account: CosmosAccount, rng: Prando): CosmosAcco
|
|
|
94
95
|
withdrawAddress: "",
|
|
95
96
|
unbondings: [],
|
|
96
97
|
redelegations: [],
|
|
98
|
+
sequence: 1,
|
|
97
99
|
};
|
|
98
100
|
if (spendableBalance.isZero()) return account;
|
|
99
101
|
|
|
@@ -161,6 +163,7 @@ function addRedelegationOperation(account: CosmosAccount, rng: Prando): CosmosAc
|
|
|
161
163
|
withdrawAddress: "",
|
|
162
164
|
unbondings: [],
|
|
163
165
|
redelegations: [],
|
|
166
|
+
sequence: 1,
|
|
164
167
|
};
|
|
165
168
|
if (!cosmosResources.delegations.length) return account;
|
|
166
169
|
|
|
@@ -220,6 +223,7 @@ function addClaimRewardsOperation(account: CosmosAccount, rng: Prando): CosmosAc
|
|
|
220
223
|
withdrawAddress: "",
|
|
221
224
|
unbondings: [],
|
|
222
225
|
redelegations: [],
|
|
226
|
+
sequence: 1,
|
|
223
227
|
};
|
|
224
228
|
if (!cosmosResources.delegations.length) return account;
|
|
225
229
|
|
|
@@ -268,6 +272,7 @@ function addUndelegationOperation(account: CosmosAccount, rng: Prando): CosmosAc
|
|
|
268
272
|
withdrawAddress: "",
|
|
269
273
|
unbondings: [],
|
|
270
274
|
redelegations: [],
|
|
275
|
+
sequence: 1,
|
|
271
276
|
};
|
|
272
277
|
if (!cosmosResources.delegations.length) return account;
|
|
273
278
|
|
|
@@ -366,6 +371,7 @@ function postScanAccount(
|
|
|
366
371
|
withdrawAddress: account.id,
|
|
367
372
|
unbondings: [],
|
|
368
373
|
redelegations: [],
|
|
374
|
+
sequence: 0,
|
|
369
375
|
};
|
|
370
376
|
account.operations = [];
|
|
371
377
|
}
|
|
@@ -11,6 +11,7 @@ export function toCosmosResourcesRaw(r: CosmosResources): CosmosResourcesRaw {
|
|
|
11
11
|
withdrawAddress,
|
|
12
12
|
redelegations,
|
|
13
13
|
unbondings,
|
|
14
|
+
sequence,
|
|
14
15
|
} = r;
|
|
15
16
|
|
|
16
17
|
return {
|
|
@@ -37,6 +38,7 @@ export function toCosmosResourcesRaw(r: CosmosResources): CosmosResourcesRaw {
|
|
|
37
38
|
pendingRewardsBalance: pendingRewardsBalance.toString(),
|
|
38
39
|
unbondingBalance: unbondingBalance.toString(),
|
|
39
40
|
withdrawAddress,
|
|
41
|
+
sequence,
|
|
40
42
|
};
|
|
41
43
|
}
|
|
42
44
|
export function fromCosmosResourcesRaw(r: CosmosResourcesRaw): CosmosResources {
|
|
@@ -48,6 +50,7 @@ export function fromCosmosResourcesRaw(r: CosmosResourcesRaw): CosmosResources {
|
|
|
48
50
|
unbondingBalance,
|
|
49
51
|
withdrawAddress,
|
|
50
52
|
unbondings,
|
|
53
|
+
sequence,
|
|
51
54
|
} = r;
|
|
52
55
|
return {
|
|
53
56
|
delegations: delegations.map(({ amount, status, pendingRewards, validatorAddress }) => ({
|
|
@@ -73,6 +76,7 @@ export function fromCosmosResourcesRaw(r: CosmosResourcesRaw): CosmosResources {
|
|
|
73
76
|
pendingRewardsBalance: new BigNumber(pendingRewardsBalance),
|
|
74
77
|
unbondingBalance: new BigNumber(unbondingBalance),
|
|
75
78
|
withdrawAddress,
|
|
79
|
+
sequence,
|
|
76
80
|
};
|
|
77
81
|
}
|
|
78
82
|
|