mirror of
https://github.com/alexgo-io/alex-sdk.git
synced 2026-01-12 14:25:02 +08:00
fix: findCurrencyByNativeAddress with STX
This commit is contained in:
21861
package-lock.json
generated
Normal file
21861
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -68,7 +68,10 @@ export function getCurrencyNativeAddress(currency: Currency) {
|
||||
export function findCurrencyByNativeAddress(
|
||||
address: string
|
||||
): Currency | undefined {
|
||||
return Object.values(Currency).find(
|
||||
(a) => getCurrencyNativeAddress(a).split('::')[0] === address.split('::')[0]
|
||||
);
|
||||
return Object.values(Currency)
|
||||
.filter((a) => a !== Currency.STX)
|
||||
.find(
|
||||
(a) =>
|
||||
getCurrencyNativeAddress(a).split('::')[0] === address.split('::')[0]
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user