useEtherspotBalances()
A React hook that returns the native balance for a particular blockchain supported by the Etherspot Platform.
Introduction
How to use
import {
useEtherspotBalances,
} from '@etherspot/transaction-kit';
// Later in the main component function...
const etherspotBalanceOnMatic = useEtherspotBalances(137);
// etherspotBalanceOnMatic will look similar to this:
/**
* [
* {
* "token": null,
* "balance": {
* "type": "BigNumber",
* "hex": "0x00"
* },
* "superBalance": null
* }
* ]
/*🎉 Congratulations!
Last updated
Was this helpful?