b749a05736
* chore: update of deal ticket data * chore: update of deal ticket data * chore: update of deal ticket data - fix re-render loop * chore: update of deal ticket data - add marketDealTicketProvider * chore: update of deal ticket data - add marketDealTicketProvider * chore: update of deal ticket data - adjust console-lite to the changes * chore: update of deal ticket data - fix failing unit tests * chore: update of deal ticket data - fix failing unit tests * chore: update of deal ticket data - fix linter failings * chore: update of deal ticket data - adjust console-lite-e2e * chore: update of deal ticket data - fix build-spec failings * chore: update of deal ticket data - fix failing e2e tests * chore: update of deal ticket data - fix failing e2e tests * chore: update of deal ticket data - fix failing e2e tests * chore: update of deal ticket data - remove unnecessary gqls * chore: update of deal ticket data - remove unnecessary gqls * chore: update of deal ticket data - remove unnecessary gqls * chore: update of deal ticket data - fix failings build * chore: update of deal ticket data - remove redundant data provider * chore: update of deal ticket data - remove redundant data provider * chore: update of deal ticket data - fix some types
12 lines
416 B
TypeScript
12 lines
416 B
TypeScript
import { useAccountBalance } from '@vegaprotocol/accounts';
|
|
import { toBigNum } from '@vegaprotocol/react-helpers';
|
|
|
|
export const useHasNoBalance = (assetId: string) => {
|
|
const { accountBalance, accountDecimals } = useAccountBalance(assetId);
|
|
const balance =
|
|
accountBalance && accountDecimals !== null
|
|
? toBigNum(accountBalance, accountDecimals)
|
|
: toBigNum('0', 0);
|
|
return balance.isZero();
|
|
};
|