Skip to content

Commit

Permalink
chore(Ton): lock event reading fix
Browse files Browse the repository at this point in the history
  • Loading branch information
D4mph1r committed Aug 13, 2024
1 parent ebfffd6 commit df06055
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export const prodBridgeConfig: IBridgeConfig = {
},
{
chain: "MATIC",
rpcURL: "https://polygon-pokt.nodies.app",
rpcURL: "https://polygon.llamarpc.com",
nativeCoinSymbol: "MATIC",
intialFund: "50000000000000000",
contractAddress: "0x2011DAD5caE280243d075D12a38CcCc0Fb4412dE",
Expand Down
5 changes: 4 additions & 1 deletion src/handler/ton/utils/listenForLockEvents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@ export default async function listenForLockEvents(
for (let i = 0; i < tx.outMessages.size; i++) {
const log = tx.outMessages.get(i) ?? raise("Unreachable");
// if its not the lock nft event we early return
if (log.body.asSlice().loadUint(32) !== 2105076052) {
if (
log.body.bits.length <= 0 ||
log.body.asSlice().loadUint(32) !== 2105076052
) {
continue;
}
const {
Expand Down

0 comments on commit df06055

Please sign in to comment.