Skip to content

Subtracts multiple balances from the existing balances. Returns a new BalanceArray.

subtractBalances<T>(balancesToSubtract, balances, allowUnderflow?): BalanceArray<T>

Defined in: packages/bitbadgesjs-sdk/src/core/balances.ts:425

Subtracts multiple balances from the existing balances. Returns a new BalanceArray.

Throws an error if the balances underflow.

Type Parameters

T

T extends NumberType

Parameters

balancesToSubtract

iBalance<T>[]

balances

iBalance<T>[]

allowUnderflow?

boolean

Returns

BalanceArray<T>

Remarks

Can also be used via the corresponding method with same name on BalanceArray

Edit this page on GitHub