Changeset View
Changeset View
Standalone View
Standalone View
web/cashtab/src/hooks/useBCH.js
Show First 20 Lines • Show All 421 Lines • ▼ Show 20 Lines | ) => { | ||||
} | } | ||||
const value = values.reduce( | const value = values.reduce( | ||||
(previous, current) => new BigNumber(current).plus(previous), | (previous, current) => new BigNumber(current).plus(previous), | ||||
new BigNumber(0), | new BigNumber(0), | ||||
); | ); | ||||
// If user is attempting to send less than minimum accepted by the backend | // If user is attempting to send less than minimum accepted by the backend | ||||
if (value.lt(new BigNumber('0.00000546'))) { | if (value.lt(new BigNumber(currency.dust))) { | ||||
// Throw the same error given by the backend attempting to broadcast such a tx | // Throw the same error given by the backend attempting to broadcast such a tx | ||||
throw new Error('dust'); | throw new Error('dust'); | ||||
} | } | ||||
const REMAINDER_ADDR = wallet.Path1899.cashAddress; | const REMAINDER_ADDR = wallet.Path1899.cashAddress; | ||||
const inputUtxos = []; | const inputUtxos = []; | ||||
let transactionBuilder; | let transactionBuilder; | ||||
// instance of transaction builder | // instance of transaction builder | ||||
▲ Show 20 Lines • Show All 127 Lines • Show Last 20 Lines |