Skip to content

Commit 76208a5

Browse files
committed
fix bugs
1 parent 98bf0d2 commit 76208a5

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

utils/transaction.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ const convertTransactionData_Deposit = async (origin: any) => {
203203
}
204204
}
205205
const publickeyDecimalToHex128 = (decimalPublicKey: string) => {
206-
const hex = BigNumber.from(decimalPublicKey).toHexString().slice(2)
206+
const hex = BigNumber.from(decimalPublicKey).toHexString()
207207
const n = 64 - hex.length
208208
return '0'.repeat(n) + hex
209209
}
@@ -260,20 +260,19 @@ const convertTransactionData_AmmExit = async (origin: any) => {
260260
const tokens = await getTokens()
261261
const feeTokenInfo = tokens.find(x => x.tokenId === origin.feeTokenID)
262262
const tokenInfo = tokens.find(x => x.tokenId === origin.tokenID)
263-
264263
return {
265264
transaction: {
266265
account: {
267-
address: origin.from,
268-
id: origin.accountID,
266+
address: origin.to,
267+
id: origin.accountToID
269268
},
270269
token: {
271270
decimals: tokenInfo.decimals,
272271
symbol: tokenInfo.symbol,
273272
},
274273
pool: {
275-
address: origin.to,
276-
id: origin.toTokenID
274+
address: origin.from,
275+
id: origin.accountFromID,
277276
},
278277
amount: origin.amount,
279278
feeToken: {

0 commit comments

Comments
 (0)