mirror of
https://github.com/status-im/safe-react.git
synced 2025-02-17 12:07:09 +00:00
Fix safe creation from walletConnect (#703)
This commit is contained in:
parent
f1235738c0
commit
fad5e10c2e
@ -302,6 +302,11 @@ const SafeDeployment = ({ creationTxHash, onCancel, onRetry, onSuccess, provider
|
|||||||
const web3 = getWeb3()
|
const web3 = getWeb3()
|
||||||
const receipt = await web3.eth.getTransactionReceipt(safeCreationTxHash)
|
const receipt = await web3.eth.getTransactionReceipt(safeCreationTxHash)
|
||||||
|
|
||||||
|
let safeAddress
|
||||||
|
|
||||||
|
if (receipt.events) {
|
||||||
|
safeAddress = receipt.events.ProxyCreation.returnValues.proxy
|
||||||
|
} else {
|
||||||
// get the address for the just created safe
|
// get the address for the just created safe
|
||||||
const events = web3.eth.abi.decodeLog(
|
const events = web3.eth.abi.decodeLog(
|
||||||
[
|
[
|
||||||
@ -313,7 +318,9 @@ const SafeDeployment = ({ creationTxHash, onCancel, onRetry, onSuccess, provider
|
|||||||
receipt.logs[0].data,
|
receipt.logs[0].data,
|
||||||
receipt.logs[0].topics,
|
receipt.logs[0].topics,
|
||||||
)
|
)
|
||||||
const safeAddress = events[0]
|
safeAddress = events[0]
|
||||||
|
}
|
||||||
|
|
||||||
setCreatedSafeAddress(safeAddress)
|
setCreatedSafeAddress(safeAddress)
|
||||||
|
|
||||||
interval = setInterval(async () => {
|
interval = setInterval(async () => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user