Skip to content

Commit

Permalink
feat(app): show no quote token available message
Browse files Browse the repository at this point in the history
  • Loading branch information
cor committed Jan 24, 2025
1 parent 1d255c7 commit 8553ad1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ let { rawIntents, intents, validation } = stores
{#if !transferArgs}
<LoadingDots/>
{:else if transferArgs === "NO_QUOTE_AVAILABLE"}
No quote token available for this pair
<div class="text-xs text-center">No Quote Token available for this transfer. Sending new assets to Cosmos is currently not supported and will be enabled in an update soon.</div>
{:else}
<div class="flex-1 flex flex-col items-center text-xs">
<Token amount={$rawIntents.amount} chainId={$rawIntents.destination} denom={transferArgs.quoteToken} {chains}/>
Expand Down
7 changes: 4 additions & 3 deletions app/src/lib/components/TransferFrom/index.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,13 @@ rawIntents.subscribe(async () => {
const quoteToken = await getQuoteToken($rawIntents.source, baseToken, $channel)
if (quoteToken.isErr()) {
return null
transferArgs.set(null)
return;
}
if (quoteToken.value.type === "NO_QUOTE_AVAILABLE") {
return "NO_QUOTE_AVAILABLE"
transferArgs.set("NO_QUOTE_AVAILABLE")
return;
}
const receiver =
Expand All @@ -84,7 +86,6 @@ rawIntents.subscribe(async () => {
? fromHex(`0x${$channel.source_port_id}`, "string")
: `0x${$channel.source_port_id}`
console.log("setting")
transferArgs.set({
baseToken,
Expand Down

0 comments on commit 8553ad1

Please sign in to comment.