fix `valueInWei` so its always a string

This commit is contained in:
fernandomg 2020-07-14 16:01:00 -03:00
parent 92cb386cc7
commit 1fb191b7ae
9 changed files with 10 additions and 10 deletions

View File

@ -15,7 +15,7 @@ export const upgradeSafeToLatestVersion = async (safeAddress, createTransaction)
createTransaction({
safeAddress,
to: MULTI_SEND_ADDRESS,
valueInWei: 0,
valueInWei: '0',
txData: encodeMultiSendCallData,
notifiedTransaction: 'STANDARD_TX',
enqueueSnackbar: () => {},

View File

@ -37,7 +37,7 @@ const sendTransactions = (dispatch, safeAddress, txs, enqueueSnackbar, closeSnac
createTransaction({
safeAddress,
to: multiSendAddress,
valueInWei: 0,
valueInWei: '0',
txData: encodeMultiSendCallData,
notifiedTransaction: 'STANDARD_TX',
enqueueSnackbar,

View File

@ -34,7 +34,7 @@ export const sendAddOwner = async (values, safeAddress, ownersOld, enqueueSnackb
createTransaction({
safeAddress,
to: safeAddress,
valueInWei: 0,
valueInWei: '0',
txData,
notifiedTransaction: TX_NOTIFICATION_TYPES.SETTINGS_CHANGE_TX,
enqueueSnackbar,

View File

@ -53,7 +53,7 @@ export const sendRemoveOwner = async (
createTransaction({
safeAddress,
to: safeAddress,
valueInWei: 0,
valueInWei: '0',
txData,
notifiedTransaction: TX_NOTIFICATION_TYPES.SETTINGS_CHANGE_TX,
enqueueSnackbar,

View File

@ -47,7 +47,7 @@ export const sendReplaceOwner = async (
createTransaction({
safeAddress,
to: safeAddress,
valueInWei: 0,
valueInWei: '0',
txData,
notifiedTransaction: TX_NOTIFICATION_TYPES.SETTINGS_CHANGE_TX,
enqueueSnackbar,

View File

@ -43,7 +43,7 @@ const ThresholdSettings = ({ classes, closeSnackbar, enqueueSnackbar }) => {
createTransaction({
safeAddress,
to: safeAddress,
valueInWei: 0,
valueInWei: '0',
txData,
notifiedTransaction: TX_NOTIFICATION_TYPES.SETTINGS_CHANGE_TX,
enqueueSnackbar,

View File

@ -53,7 +53,7 @@ const RejectTxModal = ({ classes, closeSnackbar, enqueueSnackbar, isOpen, onClos
createTransaction({
safeAddress,
to: safeAddress,
valueInWei: 0,
valueInWei: '0',
notifiedTransaction: TX_NOTIFICATION_TYPES.CANCELLATION_TX,
enqueueSnackbar,
closeSnackbar,

View File

@ -91,7 +91,7 @@ interface CreateTransaction extends WithSnackbarProps {
to: string
txData?: string
txNonce?: number | string
valueInWei: number | string
valueInWei: string
}
const createTransaction = ({
@ -187,7 +187,7 @@ const createTransaction = ({
const txToMock: TxToMock = {
...txArgs,
confirmations: [], // this is used to determine if a tx is pending or not. See `calculateTransactionStatus` helper
value: `${txArgs.valueInWei}`,
value: txArgs.valueInWei,
safeTxHash: generateSafeTxHash(safeAddress, txArgs),
}
const mockedTx = await mockTransaction(txToMock, safeAddress, state)

View File

@ -93,5 +93,5 @@ export type TxArgs = {
sender?: string
sigs: string
to: string
valueInWei: number | string
valueInWei: string
}