-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ana/fix coinlookup for multidenom (#565)
* add multidenom coinlookups * move coinlookups to separate file for readability
- Loading branch information
1 parent
1f90632
commit 773a6df
Showing
2 changed files
with
108 additions
and
49 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,100 @@ | ||
const terraCoinLookup = [ | ||
{ | ||
chainDenom: 'uluna', | ||
viewDenom: 'LUNA', | ||
chainToViewConversionFactor: 1e-6 | ||
}, | ||
{ | ||
chainDenom: 'ukrw', | ||
viewDenom: 'KRT', | ||
chainToViewConversionFactor: 1e-6 | ||
}, | ||
{ | ||
chainDenom: 'ukrw', | ||
viewDenom: 'KRT', | ||
chainToViewConversionFactor: 1e-6 | ||
}, | ||
{ | ||
chainDenom: 'umnt', | ||
viewDenom: 'MNT', | ||
chainToViewConversionFactor: 1e-6 | ||
}, | ||
{ | ||
chainDenom: 'usdr', | ||
viewDenom: 'SDT', | ||
chainToViewConversionFactor: 1e-6 | ||
}, | ||
{ | ||
chainDenom: 'uusd', | ||
viewDenom: 'UST', | ||
chainToViewConversionFactor: 1e-6 | ||
} | ||
] | ||
// in the case of e-Money, some tokens only exist in mainnet and viceversa, some tokens only exist in testnet | ||
// still, this will probably soon change with the new testnet | ||
// also it is just more simple to add them all in the same dictionary | ||
const emoneyCoinLookup = [ | ||
{ | ||
chainDenom: 'ungm', | ||
viewDenom: 'NGM', | ||
chainToViewConversionFactor: 1e-6 | ||
}, | ||
{ | ||
chainDenom: 'edkk', | ||
viewDenom: 'eDKK', | ||
chainToViewConversionFactor: 1e-6 | ||
}, | ||
{ | ||
chainDenom: 'enok', | ||
viewDenom: 'eNOK', | ||
chainToViewConversionFactor: 1e-6 | ||
}, | ||
{ | ||
chainDenom: 'esek', | ||
viewDenom: 'eSEK', | ||
chainToViewConversionFactor: 1e-6 | ||
}, | ||
{ | ||
chainDenom: 'echf', | ||
viewDenom: 'eCHF', | ||
chainToViewConversionFactor: 1e-6 | ||
}, | ||
{ | ||
chainDenom: 'eeur', | ||
viewDenom: 'eEUR', | ||
chainToViewConversionFactor: 1e-6 | ||
}, | ||
{ | ||
chainDenom: 'eusd', | ||
viewDenom: 'eUSD', | ||
chainToViewConversionFactor: 1e-6 | ||
}, | ||
{ | ||
chainDenom: 'ejpy', | ||
viewDenom: 'eJPY', | ||
chainToViewConversionFactor: 1e-6 | ||
} | ||
] | ||
const coinLookupDictionary = { | ||
"cosmos-hub-mainnet": [{ | ||
chainDenom: 'uatom', | ||
viewDenom: 'ATOM', | ||
chainToViewConversionFactor: 1e-6 | ||
}], | ||
"cosmos-hub-testnet": [{ | ||
chainDenom: 'umuon', | ||
viewDenom: 'MUON', | ||
chainToViewConversionFactor: 1e-6 | ||
}], | ||
"terra-mainnet": terraCoinLookup, | ||
"terra-testnet": terraCoinLookup, | ||
"emoney-mainnet": emoneyCoinLookup, | ||
"emoney-testnet": emoneyCoinLookup, | ||
"polkadot-testnet": [{ | ||
chainDenom: 'Planck', | ||
viewDenom: 'KSM', | ||
chainToViewConversionFactor: 1e-12 | ||
}] | ||
} | ||
|
||
module.exports = {coinLookupDictionary} |
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