Skip to content

Commit

Permalink
bugfix:lnv3 config
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoch05 committed Jan 13, 2024
1 parent 75b7646 commit 5e0f04f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion apollo/src/lnv3/lnv3.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -266,13 +266,19 @@ export class Lnv3Service implements OnModuleInit {
});
const toChain = this.getDestChain(record.remoteChainId.toString());
if (toChain === null) {
latestNonce += 1;
this.fetchCache[index].latestRelayerInfoNonce = latestNonce;
this.logger.warn(`cannot find toChain, id ${record.remoteChainId}`);
continue;
}
const penalty = record.penalty ?? '0';
if (!relayerInfo) {
const fromToken = this.getTokenInfo(transfer, record.sourceToken);
const channel = this.getMessageChannel(transfer, toChain.chain);
if (fromToken === null || channel === null) {
latestNonce += 1;
this.fetchCache[index].latestRelayerInfoNonce = latestNonce;
this.logger.warn(`cannot find fromToken or channel, channel ${channel}`);
continue;
}
// if not exist create
Expand All @@ -282,7 +288,7 @@ export class Lnv3Service implements OnModuleInit {
fromChain: transfer.chain,
toChain: toChain.chain,
bridge: `lnv3`,
nonce: latestNonce,
nonce: latestNonce + 1,
relayer: record.provider,
sendToken: record.sourceToken,
transactionHash: record.transactionHash,
Expand Down
2 changes: 1 addition & 1 deletion apollo/src/lnv3/transfer.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export class TransferService extends BaseTransferServiceT2 {
channel: 'layerzero',
},
{
chain: 'zksync-sepolia',
chain: 'sepolia',
channel: 'layerzero',
},
],
Expand Down

0 comments on commit 5e0f04f

Please sign in to comment.