-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
28 additions
and
20 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
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 { getGenesisHash } from '../chains'; | ||
import { getBalances } from './getBalance'; | ||
|
||
/** | ||
* To get balances on the tree default chains, Polkadot, Kusama, and Westend. | ||
* | ||
* @param address - The any chain address. | ||
*/ | ||
export async function getDefaultTokenBalances(address: string) { | ||
const westendGenesisHash = getGenesisHash('westend'); // These will be changed when dropdown component will be available | ||
const westendBalances = await getBalances(westendGenesisHash, address); | ||
|
||
const polkadotGenesisHash = getGenesisHash('polkadot'); // These will be changed when dropdown component will be available | ||
const polkadotBalances = await getBalances(polkadotGenesisHash, address); | ||
|
||
const kusamaGenesisHash = getGenesisHash('kusama'); // These will be changed when dropdown component will be available | ||
const kusamaBalances = await getBalances(kusamaGenesisHash, address); | ||
|
||
return { | ||
westendBalances, | ||
polkadotBalances, | ||
kusamaBalances, | ||
}; | ||
} |