Compare commits
No commits in common. "e8a7fec3264524a6de26fc91e51302d55a340361" and "6137e1328aeb1b700d16d48da317f82f416b5e96" have entirely different histories.
e8a7fec326
...
6137e1328a
@ -553,7 +553,7 @@ const actions = {
|
|||||||
|
|
||||||
const callParams = {
|
const callParams = {
|
||||||
method: 'eth_sendTransaction',
|
method: 'eth_sendTransaction',
|
||||||
params: Object.assign({ gas: numberToHex(gasLimit) }, incompletedTx),
|
params: Object.assign({ gasLimit }, incompletedTx),
|
||||||
watcherParams: {
|
watcherParams: {
|
||||||
title: { path: 'depositing', amount, currency },
|
title: { path: 'depositing', amount, currency },
|
||||||
successTitle: {
|
successTitle: {
|
||||||
@ -672,7 +672,7 @@ const actions = {
|
|||||||
const nativeCurrency = rootGetters['metamask/nativeCurrency']
|
const nativeCurrency = rootGetters['metamask/nativeCurrency']
|
||||||
const withdrawType = state.withdrawType
|
const withdrawType = state.withdrawType
|
||||||
|
|
||||||
let relayer = BigInt(0)
|
const relayer = BigInt(rootState.relayer.selectedRelayer.address)
|
||||||
let fee = BigInt(0)
|
let fee = BigInt(0)
|
||||||
let refund = BigInt(0)
|
let refund = BigInt(0)
|
||||||
|
|
||||||
@ -718,7 +718,6 @@ const actions = {
|
|||||||
// Don't need to calculate or estimate relayer fee, so, return proof immediately
|
// Don't need to calculate or estimate relayer fee, so, return proof immediately
|
||||||
if (withdrawType !== 'relayer') return calculateSnarkProof()
|
if (withdrawType !== 'relayer') return calculateSnarkProof()
|
||||||
|
|
||||||
relayer = BigInt(rootState.relayer.selectedRelayer.address)
|
|
||||||
fee = BigInt(rootState.fees.withdrawalFeeViaRelayer)
|
fee = BigInt(rootState.fees.withdrawalFeeViaRelayer)
|
||||||
const naiveProof = await calculateSnarkProof()
|
const naiveProof = await calculateSnarkProof()
|
||||||
if (Number(note.netId) === 1) return naiveProof // Don't need to smart-estimate fee if we use V4 withdrawal
|
if (Number(note.netId) === 1) return naiveProof // Don't need to smart-estimate fee if we use V4 withdrawal
|
||||||
@ -764,7 +763,7 @@ const actions = {
|
|||||||
throw new Error(e.message)
|
throw new Error(e.message)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async withdraw({ state, rootState, rootGetters, dispatch, getters }, { note }) {
|
async withdraw({ state, rootState, dispatch, getters }, { note }) {
|
||||||
try {
|
try {
|
||||||
const [, currency, amount, netId] = note.split('-')
|
const [, currency, amount, netId] = note.split('-')
|
||||||
const config = networkConfig[`netId${netId}`]
|
const config = networkConfig[`netId${netId}`]
|
||||||
@ -780,14 +779,13 @@ const actions = {
|
|||||||
const incompletedTx = {
|
const incompletedTx = {
|
||||||
data,
|
data,
|
||||||
value: args[5],
|
value: args[5],
|
||||||
to: contractInstance._address,
|
to: contractInstance._address
|
||||||
from: ethAccount
|
|
||||||
}
|
}
|
||||||
const gasLimit = await rootGetters['fees/oracle'].getGasLimit(incompletedTx, 'other', 20)
|
const gasLimit = await rootGetters['fees/oracle'].getGasLimit(incompletedTx, 'user_withdrawal')
|
||||||
|
|
||||||
const callParams = {
|
const callParams = {
|
||||||
method: 'eth_sendTransaction',
|
method: 'eth_sendTransaction',
|
||||||
params: Object.assign({ gas: numberToHex(gasLimit) }, incompletedTx),
|
params: Object.assign({ gasLimit }, incompletedTx),
|
||||||
watcherParams: {
|
watcherParams: {
|
||||||
title: { path: 'withdrawing', amount, currency },
|
title: { path: 'withdrawing', amount, currency },
|
||||||
successTitle: {
|
successTitle: {
|
||||||
|
@ -249,7 +249,7 @@ export const actions = {
|
|||||||
const isUpdatedMajor = major === requiredMajor
|
const isUpdatedMajor = major === requiredMajor
|
||||||
|
|
||||||
if (prerelease) return false
|
if (prerelease) return false
|
||||||
return isUpdatedMajor && (Number(patch) >= 5 || netId !== 1) // Patch checking - also backwards compatibility for Mainnet
|
return isUpdatedMajor && (Number(patch) >= 4 || netId !== 1) // Patch checking - also backwards compatibility for Mainnet
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isRelayerUpdated()) {
|
if (!isRelayerUpdated()) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user