Skip to content

Commit

Permalink
Fix fuse adapter
Browse files Browse the repository at this point in the history
  • Loading branch information
vrtnd committed Mar 19, 2024
1 parent 50bf343 commit 1d5c5fc
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions src/adapters/fuse/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const ercDepositEventParams: ContractEventParams = {
token: "token",
from: "from",
amount: "amount",
to: 'to'
},
isDeposit: true,
};
Expand All @@ -43,7 +44,7 @@ const ercWithdrawalEventParams: ContractEventParams = {
],
argKeys: {
token: "token",
from: "to",
to: "to",
amount: "amount",
},
isDeposit: false,
Expand All @@ -57,7 +58,7 @@ const nativeWithdrawalEventParams: ContractEventParams = {
],
argKeys: {
token: "localToken",
from: "to",
to: "to",
amount: "amount",
},
isDeposit: false,
Expand All @@ -71,8 +72,8 @@ const nativeDepositEventParams: ContractEventParams = {
],
argKeys: {
token: "localToken",
from: "from",
amount: "amount",
from: "to",
},
isDeposit: true,
};
Expand All @@ -88,16 +89,25 @@ const constructParams = (chain: string) => {
const ercWithdrawParams = {
...ercWithdrawalEventParams,
target: ercContract,
fixedEventData: {
from: ercContract,
}
}
const nativeContract = nativeContracts[chain];
if (nativeContract !== "") {
const nativeDepositParams = {
...nativeDepositEventParams,
target: nativeContract,
fixedEventData: {
to: nativeContract
}
}
const nativeWithdrawParams = {
...nativeWithdrawalEventParams,
target: nativeContract,
fixedEventData: {
from: nativeContract,
}
}
eventParams.push(nativeDepositParams, nativeWithdrawParams);
}
Expand Down

0 comments on commit 1d5c5fc

Please sign in to comment.