Skip to content

Commit 88cfd32

Browse files
authored
Merge pull request #3070 from DFXswiss/develop
Release: develop -> main
2 parents 9a035b2 + cdf3358 commit 88cfd32

3 files changed

Lines changed: 9 additions & 5 deletions

File tree

src/integration/blockchain/shared/blockscout/blockscout.service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@ export interface BlockscoutTransaction {
1313
}
1414

1515
export interface BlockscoutTokenTransfer {
16-
tx_hash: string;
16+
transaction_hash: string;
1717
block_number: number;
1818
timestamp: string;
1919
from: { hash: string };
2020
to: { hash: string };
2121
token: {
22-
address: string;
22+
address_hash: string;
2323
symbol: string;
2424
name: string;
2525
decimals: string;

src/integration/blockchain/shared/evm/citrea-base-client.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,9 @@ export abstract class CitreaBaseClient extends EvmClient {
159159
.map((tx) => ({
160160
blockNumber: tx.block_number.toString(),
161161
timeStamp: tx.timestamp,
162-
hash: tx.tx_hash,
162+
hash: tx.transaction_hash,
163163
from: tx.from.hash,
164-
contractAddress: tx.token.address,
164+
contractAddress: tx.token.address_hash,
165165
to: tx.to.hash,
166166
value: tx.total.value,
167167
tokenName: tx.token.name || tx.token.symbol,

src/integration/blockchain/shared/evm/evm-client.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -663,7 +663,11 @@ export abstract class EvmClient extends BlockchainClient {
663663
async getSwapResult(txId: string, asset: Asset): Promise<number> {
664664
const receipt = await this.getTxReceipt(txId);
665665

666-
const swapLog = receipt?.logs?.find((l) => l.address.toLowerCase() === asset.chainId);
666+
const walletTopic = ethers.utils.hexZeroPad(this.walletAddress.toLowerCase(), 32);
667+
668+
const swapLog = receipt?.logs?.find(
669+
(l) => l.address.toLowerCase() === asset.chainId.toLowerCase() && l.topics[2]?.toLowerCase() === walletTopic,
670+
);
667671
if (!swapLog) throw new Error(`Failed to get swap result for TX ${txId}`);
668672

669673
const token = await this.getToken(asset);

0 commit comments

Comments
 (0)