-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move TokenBalances Covalent route to backend (#1211)
* replace covalant tokenBalance route with backend api * point development backend url to staging * fix lint errors * update the Query for token fetching * resolved updateAt comment
- Loading branch information
1 parent
208ce6d
commit 236fc32
Showing
2 changed files
with
72 additions
and
68 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 |
---|---|---|
@@ -1,27 +1,14 @@ | ||
export type CovalentBaseToken = { | ||
contract_decimals: number; | ||
contract_name: string; | ||
contract_ticker_symbol: string; | ||
contract_address: string; | ||
logo_url: string; | ||
export type TokenItemType = { | ||
balance: string; | ||
contractAddress: string; | ||
contractDecimals: number; | ||
contractName: string; | ||
contractTickerSymbol: string; | ||
logoUrl: string; | ||
nativeToken: boolean; | ||
}; | ||
|
||
export type CovalentTokenBalance = { | ||
export type TokenBalanceResponse = { | ||
updated_at: string; | ||
items: Array< | ||
CovalentBaseToken & { | ||
native_token: boolean; | ||
nft_data: CovalentNFTData; | ||
|
||
// this is BigInt value that needs to be adjusted using the | ||
// decimals for human-friendly display | ||
balance: string; | ||
} | ||
>; | ||
}; | ||
|
||
// TODO: flesh this out when NFT support | ||
// has been added | ||
type CovalentNFTData = { | ||
token_id: string; | ||
items: Array<TokenItemType>; | ||
}; |
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