Closed 0xmilktea closed 1 month ago
Okay, here's my first round of feedback based on the testing I've done so far.
I tried a number of cross-chain swaps and transfers of AVAX from ICON to Avalanche, but the confirmation modal would never move past the Awaiting confirmation on Avalanche
step. I did receive AVAX on Avalanche, and refreshing the page on Balanced shows the correct amount in my wallet, but the transaction still shows as pending in the UI (even after I disconnect all wallets).
I'm unable to complete a swap from Archway to Avalanche:
The UI isn't pulling through my AVAX balance on Avalanche:
The destination blockchain was inconsistent in this transaction:
Connect Wallet
to Transfer
:
Bridge
H2 back to Transfer
I know it’s inconsistent with the tab label, but this was a conscious decision to improve the way we talk about it in the content that surrounds and supports this feature.[x] Update the bridge content for Avalanche:
Bridge = Custom Relay + GMP
Tooltip =
Custom Relay can connect any chain to ICON's GMP service. Connections are secured by multiple relays, which are managed by different entities.
GMP (general message passing) is a cross-chain messenger that interacts with smart contracts on supported chains.
Increase the tooltip width to 310px for optimal readability.
Update the xCall content to GMP for the Archway connection, as well.
Following on from that...
[x] Only show relevant blockchains in the blockchain selector
AVAX isn't available on Archway, just as sARCH isn't available on Avalanche, yet the UI allows this combination to exist. Only supported blockchains should appear for the chosen asset.
[x] After you choose a blockchain from the dropdown selector, make the dropdown disappear rather than require you to click away to hide it. It's quite annoying in the Bridge tab.
[x] When you choose AVAX from an asset selector, the blockchain should default to Avalanche, and the blockchain selector should appear so you know there's an option to change it. The dropdown behaviour has disappeared in this PR, but you can see how it should behave in the live app or this screen recording: https://github.com/balancednetwork/balanced-network-interface/assets/63842577/826c0987-f9e7-4acf-a64d-baadb157c3c7
[x] Adjust the wording in the cross-chain confirmation modals
Awaiting confirmation on {blockchain}.
-> Awaiting confirmation on {blockchain}...
Awaiting execution on {blockchain}.
-> Finalising transaction on {blockchain}...
xCall in progress
button label -> Transfer in progress
Sign out
link disconnect all wallets. Avalanche refuses to disconnect currently.
Yes we do want to use avax as collateral on icon as well before the cross chain loans is ready
@0xmilktea we need to fix the crashing issue due to store migration.
@0xmilktea hana integration as well
[x] https://github.com/balancednetwork/balanced-network-interface/issues/1304
[ ] https://github.com/balancednetwork/balanced-network-interface/issues/1328
[x] ust making sure when swapping any asset to bnusd - bnusd should be available as a delivery chain for avax (all connected chains)
[ ] Add AVAX on ICON as a collateral type (I assume the plan is still to launch with the ICON version. allowing avax on Loan contract is not done yet. blocked
[ ] we need to fix the crashing issue due to store migration.
You shouldn’t be able to surface a confirmation modal until the base requirements for the transaction have been met. In this instance, only display the sign-in modal so the app can load in the wallet balance and addresses involved before moving ahead.
[x] Adjust the wording in the cross-chain swap confirmation modal:
Awaiting confirmation on {blockchain}.
-> Awaiting confirmation on {blockchain}…
Awaiting execution on {blockchain}.
-> Finalising transaction on {blockchain}…
xCall in progress
button label -> Swap in progress
[x] bnUSD is only available to transfer between ICON and Archway. You should be able to transfer it to/from all chains.
[x] Make USDC available to transfer to/from Archway
[x] The CALL EXECUTED message has gotta go.
We only show pending transactions in the live app, not successful ones (because they require no action from the user). I'm indifferent about their inclusion, but if we keep them we need to:
Call executed
to Complete
To increase the usefulness of the completed transaction listings, we could also link to the transaction info from each side, if available:
[x] bnUSD - doesn’t require approval on archway
[x] when approval tx is pending, disable (grey out) the button and change text to ‘approving’
Swap in progress
button disappears[x] When swapping or transferring bnUSD from non ICON chains, asset manager can't be used. See bnUSD transfer implementation for the Archway chain
[x] when trying to swap or bridge bnUSD from Avalanche, xCalls are failing because of the reason above, but the UI doesn't show any errors
[x] Change the Approve
button in the confirmation modals to Approve transfer
:
[x] Change approve
to approval
in this message:
[ ] Make this message more specific:
Couldn't approve cross-chain transfer. View common transaction issues.
[x] Replace the Connect wallet
prompt on the Bridge tab with this placeholder text: {destination blockchain} address
.
Keep the current behaviour that prefills the address for chains you're connected to.
In the latest build, when trying to pick a token to swap while the drop-down is displayed, the tokens keep moving positions randomly as the mouse hovers over it.
To remove the need to connect 2 wallets for a cross-chain swap, here's some updated handling for the Swap tab:
If you haven't connected a wallet for the recipient chain, show Choose address
instead:
(If you've already connected a wallet, continue to default to that address.)
Click Choose address
or the prefilled wallet address to get a variation of this modal:
If you enter a custom address, ignore the wallet balance because the amount is less helpful (especially if sending to an exchange). Instead, use Wallet: Custom
to draw attention to the fact that it's set to an alternative address:
If you enter a custom address and then reverse the swap (so the For
asset + chain now appear under Swap
), forget the custom address and either fill the connected wallet address or prompt to connect one.
Note: The Choose address
modal I've provided is just a mockup, and I've already talked to @hetfly about this in more detail, so I'd prefer to let him tackle this piece.
There should be a time counting up underneath Pending, as well:
WalletConnect
at mobile:
Here are the issues still outstanding from my previous comments, plus a couple of additional ones based on the latest round of testing:
Enter recipient
button label with Enter address
:
finalising
step. Opening Hana seems to trigger its completion, but then a second message appears underneath after the first (there should only ever be one message):
It also results in two separate messages in the Activity section, rather than one (Avalanche -> Avalanche). It's reproducible, so I took a video the second time around. The final transaction is still pending in the UI 6 minutes later. The video is too large to include here, but you can access it from https://drive.google.com/file/d/1dtTMGV-4JNGA-aMNVQw1AbY5dPwh6s8a/
Choose address
option is inconsistent for ICON assets. It only seems to appear when the original asset comes from another chain. cc @hetfly Choose address
:
xCall
with GMP
in the swap metadata:
Also, the bridge fee is missing from Archway -> Avalanche.
[ ] merge transfer & swap functions into one function. DRY
[ ] filter logs by xcall address. Optimize
[ ] refactor XCallService. readability.
[ ] define XCallMessageSentEvent, XCallMessageEvent, XCallExecutedEvent interfaces. XCallEvent = XCallMessageSentEvent | XCallMessageEvent | XCallExecutedEvent reference https://github.com/icon-project/xcall-multi/blob/main/docs/adr/xcall.md
[ ] define parseEventLogs(rawEventLogs: any[]) the function accepts raw event logs and filters and parses only XCallEvents
[ ] define parseEventLog(rawEventLog: any, type: XCallEventType): the function parses raw log event into the one above event interfaces. remove parseCallMessageSentEventLog, parseCallMessageEventLog, parseCallExecutedEventLog remove filterCallMessageSentEventLog, filterCallMessageEventLogs, filterCallExecutedEventLogs filterEvents(events: XCallEvent[], type: XCallEventType)
[ ] add getXCallFee and refactor related parts.
[ ] add approve and refactor related parts
xswaping USDC from archway to icon is failing.
xswaping USDC from archway to icon is failing.
@0xmilktea this is possible with routeV2 only https://github.com/balancednetwork/balanced-network-interface/issues/1328
Transfer
in the confirmation modal. Console shows this error:Error: Query failed with (6): rpc error: code = Unknown desc = failed to execute message; message index: 0: Invalid Network Address according to Network ID: execute wasm contract failed [CosmWasm/wasmd@v0.45.0/x/wasm/keeper/keeper.go:395] With gas wanted: '300000000' and gas used: '127733' : unknown request
The latest updates on your projects. Learn more about Vercel for Git ↗︎