fix(currency): wrong ID retrieval for native USDC - #1774
alexandre-abrioux-rf wants to merge 2 commits into
Conversation
| /coverage/ | ||
| /reports/ |
There was a problem hiding this comment.
(unrelated) These folders should be ignored / they can appear when running Jest from the root folder
|
| static currencyId( | ||
| currency: { symbol: string; network?: string }, | ||
| knownCurrencies?: CurrencyTypes.CurrencyDefinition[], | ||
| ): string { |
There was a problem hiding this comment.
I kept the existing static contract, and introduced an optional argument so an instance of CurrencyManager can pass down its existing known currencies whenever possible. I could not change it to a non-static method easily because it is also used in static fromInput.
Issue
When retrieving the native USDC currency on matic:
USDCn-maticUSDCmatic; with
currencyManager.from(<symbol>, <chain>), it retrieves the wrong currency:USDC-maticUSDC.ematicChanges