Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ export interface BlockscoutTransaction {
}

export interface BlockscoutTokenTransfer {
tx_hash: string;
transaction_hash: string;
block_number: number;
timestamp: string;
from: { hash: string };
to: { hash: string };
token: {
address: string;
address_hash: string;
symbol: string;
name: string;
decimals: string;
Expand Down
4 changes: 2 additions & 2 deletions src/integration/blockchain/shared/evm/citrea-base-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,9 @@ export abstract class CitreaBaseClient extends EvmClient {
.map((tx) => ({
blockNumber: tx.block_number.toString(),
timeStamp: tx.timestamp,
hash: tx.tx_hash,
hash: tx.transaction_hash,
from: tx.from.hash,
contractAddress: tx.token.address,
contractAddress: tx.token.address_hash,
to: tx.to.hash,
value: tx.total.value,
tokenName: tx.token.name || tx.token.symbol,
Expand Down
6 changes: 5 additions & 1 deletion src/integration/blockchain/shared/evm/evm-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,11 @@ export abstract class EvmClient extends BlockchainClient {
async getSwapResult(txId: string, asset: Asset): Promise<number> {
const receipt = await this.getTxReceipt(txId);

const swapLog = receipt?.logs?.find((l) => l.address.toLowerCase() === asset.chainId);
const walletTopic = ethers.utils.hexZeroPad(this.walletAddress.toLowerCase(), 32);

const swapLog = receipt?.logs?.find(
(l) => l.address.toLowerCase() === asset.chainId.toLowerCase() && l.topics[2]?.toLowerCase() === walletTopic,
);
if (!swapLog) throw new Error(`Failed to get swap result for TX ${txId}`);

const token = await this.getToken(asset);
Expand Down
Loading