diff --git a/packages/bridge-ui/src/components/Transaction.svelte b/packages/bridge-ui/src/components/Transaction.svelte index 9f03acf6cc0..2ed40a0f354 100644 --- a/packages/bridge-ui/src/components/Transaction.svelte +++ b/packages/bridge-ui/src/components/Transaction.svelte @@ -26,6 +26,7 @@ import { fetchSigner, switchNetwork } from "@wagmi/core"; import Tooltip from "./Tooltip.svelte"; import TooltipModal from "./modals/TooltipModal.svelte"; + import Bridge from "../constants/abi/Bridge"; export let transaction: BridgeTransaction; @@ -34,7 +35,6 @@ let tooltipOpen: boolean = false; let processable: boolean = false; - onMount(async () => { processable = await isProcessable(); }); @@ -103,6 +103,14 @@ const interval = setInterval(async () => { processable = await isProcessable(); + const contract = new ethers.Contract( + chains[transaction.toChainId].bridgeAddress, + Bridge, + $providers.get(chains[transaction.message.destChainId.toNumber()].id) + ); + + transaction.status = await contract.getMessageStatus(transaction.signal); + transaction = transaction; if (transaction.status === MessageStatus.Done) clearInterval(interval); }, 20 * 1000); diff --git a/packages/relayer/message/process_message.go b/packages/relayer/message/process_message.go index 3bacbba194e..ba5c303d8bb 100644 --- a/packages/relayer/message/process_message.go +++ b/packages/relayer/message/process_message.go @@ -128,19 +128,20 @@ func (p *Processor) sendProcessMessageCall( return nil, errors.New("p.getLatestNonce") } - profitable, gas, err := p.isProfitable(ctx, event.Message, proof) - if err != nil { - return nil, errors.Wrap(err, "p.isProfitable") - } - - if bool(p.profitableOnly) && !profitable { - return nil, relayer.ErrUnprofitable - } - - if gas != 0 { - auth.GasLimit = gas - log.Infof("gasLimit: %v", gas) - } + // profitable, gas, err := p.isProfitable(ctx, event.Message, proof) + // if err != nil { + // return nil, errors.Wrap(err, "p.isProfitable") + // } + + // if bool(p.profitableOnly) && !profitable { + // return nil, relayer.ErrUnprofitable + // } + + // if gas != 0 { + // auth.GasLimit = gas + // log.Infof("gasLimit: %v", gas) + // } + auth.GasLimit = 800000 // process the message on the destination bridge. tx, err := p.destBridge.ProcessMessage(auth, event.Message, proof)