Skip to content

Commit

Permalink
fix: empty claim, correct connector
Browse files Browse the repository at this point in the history
  • Loading branch information
LayneHaber committed Apr 10, 2024
1 parent d3f145c commit dbc7cfb
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ export const getProcessFromXlayerRootWriteTransaction = async ({
const hubDeposits = await getDeposits(xlayerBridgeApiEndpoint, hubConnector!.address);
const claimableMessage = spokeDeposits
.concat(hubDeposits)
.filter((d: any) => d.ready_for_claim && d.tx_hash.toLowerCase() === sendHash.toLowerCase());
.filter((d: any) => d.ready_for_claim && d.tx_hash.toLowerCase() === sendHash.toLowerCase() && !d.claim_tx_hash);

if (!claimableMessage.length) {
throw new NoRootAvailable(spokeChainId, hubChainId, requestContext, methodContext, {
Expand Down Expand Up @@ -199,7 +199,7 @@ export const getProcessFromXlayerRootWriteTransaction = async ({

const isSpokeClaim = claimable.orig_net === 0;
const domain = isSpokeClaim ? +spokeDomainId : +hubDomainId;
const connector = isSpokeClaim ? hubConnector : spokeConnector;
const connector = isSpokeClaim ? spokeConnector : hubConnector;
const iface = new Interface(connector.abi);
const ret = await chainreader.readTx({
domain,
Expand Down

0 comments on commit dbc7cfb

Please sign in to comment.