Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[THORSwaps] Prefix tokenID with symbol for tx's memo #3819

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

flypaper0
Copy link

Description

WalletCore provides wrong memo for swaps where toCoin is token.

How to test

THORChainSwapSwapInput:

▿ WalletCore.TW_THORChainSwap_Proto_SwapInput:
from_asset {
  chain: BSC
  symbol: "BNB"
}
from_address: "0x121a38277e0ba795eDf8cB6bE7935A9773e1AC25"
to_asset {
  chain: BSC
  symbol: "USDT"
  token_id: "0x55d398326f99059fF775485246999027B3197955"
}
to_address: "0x121a38277e0ba795eDf8cB6bE7935A9773e1AC25"
vault_address: "0xddfc93bdf588d966b16a8214fce70e6e7fff6280"
router_address: "0xb30ec53f98ff5947ede720d32ac2da7e52a5f56b"
from_amount: "20000000000000000"
to_amount_limit: "0"
affiliate_fee_address: "v0"
affiliate_fee_rate_bp: "70"
expiration_time: 1714226686
stream_params {
  interval: "1"
  quantity: "0"
}

Memo:

=:BSC.0x55d398326f99059fF775485246999027B3197955:0x121a38277e0ba795eDf8cB6bE7935A9773e1AC25:0/1/0:v0:70

Correct memo:
https://bscscan.com/tx/0x4cae9e82365e6eb64616ad9be58f54b42d6f8aad630f9222e3ff98103acdbdfe

Wrong swap from WalletCore:
https://bscscan.com/tx/0x0b5ba3679c4176ee9572ac6e8e2482610a8a41d509b494c70fddd0f3c2137336

@satoshiotomakan
Copy link
Collaborator

Hi @flypaper0, thank you for the funding!
Could you please add a few unit tests similar to TWTHORChainSwap.SwapRuneDoge and THORChainSwap.SwapUsdtBsc

@ArtemGoryunov
Copy link
Contributor

You provides wrong token_id. The correct value is USDT-0X55D398326F99059FF775485246999027B3197955

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants