Skip to content

Commit

Permalink
feat: add chainId property to evm balances response
Browse files Browse the repository at this point in the history
  • Loading branch information
genaroibc committed Nov 2, 2023
1 parent 02bbda7 commit 763b7f3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/handlers/evm/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,14 +238,15 @@ export class Utils {

if (!token) return null;

const { decimals, symbol, address } = token;
const { decimals, symbol, address, chainId } = token;

return {
address,
// balance in wei
balance: parseInt(balance, 16).toString(),
decimals,
symbol
symbol,
chainId
};
} catch (error) {
return null;
Expand Down
1 change: 1 addition & 0 deletions src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ export type TokenBalance = {
address: string;
decimals: number;
balance: string;
chainId: string | number;
};

export type CosmosAddress = {
Expand Down

0 comments on commit 763b7f3

Please sign in to comment.