Edit Multisig Wallet settings (#3740)
* WIP Sending tokens in multi-sig wallet * Working Token transfer for multi-sig wallet #3282 * Add operation hash to transfer modal * Add existing wallet from address #3282 * Wallet delete redirect to Wallets/Accounts #3282 * Rightly check balance in Transfer // Get all accounts balances #3282 * Fix linting * Better Header UI for Wallet * Use the `~` webpack alias * Use Webpack `~` alias * Add `ETH` format to number typed input * Fix wallet creation hint && eth input type * Update dailylimit #3282 * Fix too long copied message * WIP Wallet settings modification #3282 * WIP edit contract parameters #3282 * Edit Wallet parameters #3282 * Don't show wallets if none * Fix Transfer for Wallet #3282 * Optimized version of contract code * Fix wrong max in Wallet creation // Round gas in API
This commit is contained in:
committed by
Jaco Greeff
parent
69e010bbf9
commit
715761a714
@@ -112,11 +112,15 @@ export function inNumber10 (number) {
|
||||
}
|
||||
|
||||
export function inNumber16 (number) {
|
||||
if (isInstanceOf(number, BigNumber)) {
|
||||
return inHex(number.toString(16));
|
||||
const bn = isInstanceOf(number, BigNumber)
|
||||
? number
|
||||
: (new BigNumber(number || 0));
|
||||
|
||||
if (!bn.isInteger()) {
|
||||
throw new Error(`[format/input::inNumber16] the given number is not an integer: ${bn.toFormat()}`);
|
||||
}
|
||||
|
||||
return inHex((new BigNumber(number || 0)).toString(16));
|
||||
return inHex(bn.toString(16));
|
||||
}
|
||||
|
||||
export function inOptions (options) {
|
||||
@@ -130,6 +134,9 @@ export function inOptions (options) {
|
||||
|
||||
case 'gas':
|
||||
case 'gasPrice':
|
||||
options[key] = inNumber16((new BigNumber(options[key])).round());
|
||||
break;
|
||||
|
||||
case 'value':
|
||||
case 'nonce':
|
||||
options[key] = inNumber16(options[key]);
|
||||
|
||||
Reference in New Issue
Block a user