mirror of
https://github.com/status-im/safe-react.git
synced 2025-02-17 12:07:09 +00:00
Merge pull request #277 from gnosis/revert-before-refactor-changes
Revert before refactor changes
This commit is contained in:
commit
7d887d1e60
@ -4,7 +4,7 @@ import { TX_SERVICE_HOST, RELAY_API_URL } from '~/config/names'
|
|||||||
|
|
||||||
const stagingMainnetConfig = {
|
const stagingMainnetConfig = {
|
||||||
...stagingConfig,
|
...stagingConfig,
|
||||||
[TX_SERVICE_HOST]: 'https://safe-transaction.mainnet.gnosis.io/api/v1/',
|
[TX_SERVICE_HOST]: 'https://safe-transaction.mainnet.staging.gnosisdev.com/api/v1/',
|
||||||
[RELAY_API_URL]: 'https://safe-relay.gnosis.io/api/v1/',
|
[RELAY_API_URL]: 'https://safe-relay.gnosis.io/api/v1/',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
import { TX_SERVICE_HOST, SIGNATURES_VIA_METAMASK, RELAY_API_URL } from '~/config/names'
|
import { TX_SERVICE_HOST, SIGNATURES_VIA_METAMASK, RELAY_API_URL } from '~/config/names'
|
||||||
|
|
||||||
const stagingConfig = {
|
const stagingConfig = {
|
||||||
[TX_SERVICE_HOST]: 'https://safe-transaction.rinkeby.gnosis.io/api/v1/',
|
[TX_SERVICE_HOST]: 'https://safe-transaction.staging.gnosisdev.com/api/v1/',
|
||||||
[SIGNATURES_VIA_METAMASK]: false,
|
[SIGNATURES_VIA_METAMASK]: false,
|
||||||
[RELAY_API_URL]: 'https://safe-relay.staging.gnosisdev.com/api/v1/',
|
[RELAY_API_URL]: 'https://safe-relay.staging.gnosisdev.com/api/v1/',
|
||||||
}
|
}
|
||||||
|
@ -72,12 +72,6 @@ const createTransaction = (
|
|||||||
closeSnackbar(beforeExecutionKey)
|
closeSnackbar(beforeExecutionKey)
|
||||||
|
|
||||||
pendingExecutionKey = showSnackbar(notificationsQueue.pendingExecution, enqueueSnackbar, closeSnackbar)
|
pendingExecutionKey = showSnackbar(notificationsQueue.pendingExecution, enqueueSnackbar, closeSnackbar)
|
||||||
})
|
|
||||||
.on('error', (error) => {
|
|
||||||
console.error('Tx error: ', error)
|
|
||||||
})
|
|
||||||
.then(async (receipt) => {
|
|
||||||
closeSnackbar(pendingExecutionKey)
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await saveTxToHistory(
|
await saveTxToHistory(
|
||||||
@ -94,6 +88,12 @@ const createTransaction = (
|
|||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error(err)
|
console.error(err)
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
.on('error', (error) => {
|
||||||
|
console.error('Tx error: ', error)
|
||||||
|
})
|
||||||
|
.then((receipt) => {
|
||||||
|
closeSnackbar(pendingExecutionKey)
|
||||||
|
|
||||||
showSnackbar(
|
showSnackbar(
|
||||||
isExecution
|
isExecution
|
||||||
|
@ -103,17 +103,11 @@ const processTransaction = (
|
|||||||
|
|
||||||
await transaction
|
await transaction
|
||||||
.send(sendParams)
|
.send(sendParams)
|
||||||
.once('transactionHash', (hash) => {
|
.once('transactionHash', async (hash) => {
|
||||||
txHash = hash
|
txHash = hash
|
||||||
closeSnackbar(beforeExecutionKey)
|
closeSnackbar(beforeExecutionKey)
|
||||||
|
|
||||||
pendingExecutionKey = showSnackbar(notificationsQueue.pendingExecution, enqueueSnackbar, closeSnackbar)
|
pendingExecutionKey = showSnackbar(notificationsQueue.pendingExecution, enqueueSnackbar, closeSnackbar)
|
||||||
})
|
|
||||||
.on('error', (error) => {
|
|
||||||
console.error('Processing transaction error: ', error)
|
|
||||||
})
|
|
||||||
.then(async (receipt) => {
|
|
||||||
closeSnackbar(pendingExecutionKey)
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await saveTxToHistory(
|
await saveTxToHistory(
|
||||||
@ -130,6 +124,12 @@ const processTransaction = (
|
|||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error(err)
|
console.error(err)
|
||||||
}
|
}
|
||||||
|
})
|
||||||
|
.on('error', (error) => {
|
||||||
|
console.error('Processing transaction error: ', error)
|
||||||
|
})
|
||||||
|
.then((receipt) => {
|
||||||
|
closeSnackbar(pendingExecutionKey)
|
||||||
|
|
||||||
showSnackbar(
|
showSnackbar(
|
||||||
shouldExecute
|
shouldExecute
|
||||||
|
Loading…
x
Reference in New Issue
Block a user