forked from tornadocash/classic-ui
17 lines
421 B
JavaScript
17 lines
421 B
JavaScript
import networkConfig from '@/networkConfig'
|
|
|
|
export function getInstanceByAddress({ netId, address }) {
|
|
const { tokens } = networkConfig[`netId${netId}`]
|
|
|
|
for (const [currency, { instanceAddress }] of Object.entries(tokens)) {
|
|
for (const [amount, instance] of Object.entries(instanceAddress)) {
|
|
if (instance === address) {
|
|
return {
|
|
amount,
|
|
currency
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|