-
Notifications
You must be signed in to change notification settings - Fork 315
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[LIVE-3722][LIVE-3744][LIVE-3722] - Bugfix: Fix currencies inferences (…
…#1304) * Add missing currencies to CLI * Update wrong inferTransactions not returning txs in CLI * Update findCryptoCurrencyByKeyword looking for managerAppName first which will fail with currencies with the same nano app * improve typing * Add "keywords" key to currency and update the findByKeyword method * Add keywords to TOP 30 in marketcap currencies * Update currencies tests * Make findCryptoCurrencyByKeyword tests customisable * Reorg currencies as a temp fix to collisions * Add polyfill test to check ethereum is inferred correctly * Update doc * changesets * Fix sortByMarketcap inferring by ticker (collisions) * Add a notion of "priority" to currency sorting in registerCryptoCurrency to handle ticker collision * Update cryptoassets doc * Fix currencies list in accounts mock * Update snapshot Co-authored-by: Gaëtan Renaudeau <[email protected]>
- Loading branch information
1 parent
11d5917
commit df76dd2
Showing
14 changed files
with
447 additions
and
258 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"@ledgerhq/live-cli": patch | ||
"@ledgerhq/live-common": patch | ||
--- | ||
|
||
Fix wrong inferences for currencies + add tests to make sure we catch the issue next time |
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,6 @@ | ||
--- | ||
"@ledgerhq/cryptoassets": patch | ||
"@ledgerhq/types-cryptoassets": patch | ||
--- | ||
|
||
Fixing currency inferences in cryptoassets, and reorder currencies as a temporary fix for the ticker/managerAppName collisions' side effects |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { Application } from "@ledgerhq/types-live"; | ||
import { polyfillApplication } from "./polyfill"; | ||
|
||
test("polyfillApplication set ethereum currency for ethereum app", () => { | ||
const app: Application = { | ||
id: 1, | ||
name: "Ethereum", | ||
description: undefined, | ||
application_versions: [], | ||
providers: [], | ||
category: 0, | ||
date_creation: "", | ||
date_last_modified: "", | ||
publisher: undefined, | ||
currencyId: undefined, | ||
authorName: undefined, | ||
supportURL: undefined, | ||
contactURL: undefined, | ||
sourceURL: undefined, | ||
compatibleWalletsJSON: undefined, | ||
}; | ||
const polyfilled = polyfillApplication(app); | ||
expect(polyfilled.currencyId).toEqual("ethereum"); | ||
}); |
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
Oops, something went wrong.
df76dd2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⏲ 10min 33s ✅ 6 txs ❌ 2 txs ($75.54) for [Bot] Ethereum on Staging
❌ 2 mutation errors
Portfolio ($75.54) – Details of the 5 currencies
Performance ⏲ 10min 33s
Time spent for each spec: (total across mutations)
df76dd2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⏲ 27min 14s ✅ 89 txs ❌ 6 txs⚠️ 2 specs ($311.03) for [Bot] 'Phosphore'
2 critical spec errors
Spec ZCash failed!
Spec cardano failed!
❌ 6 mutation errors
Portfolio ($311.03) – Details of the 43 currencies
Performance ⏲ 27min 14s
Time spent for each spec: (total across mutations)
df76dd2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⏲ 18min 24s ✅ 35 txs ❌ 5 txs⚠️ 1 specs ($54.74) for [Bot] Bitcoin on Staging
1 critical spec errors
Spec ZCash failed!
❌ 5 mutation errors
Portfolio ($54.74) – Details of the 17 currencies
Performance ⏲ 18min 24s
Time spent for each spec: (total across mutations)