Skip to content

Commit

Permalink
Merge pull request #1299 from rainlanguage/2025-02-14-get-token-info-fix
Browse files Browse the repository at this point in the history
Disable get token info calls if not all select tokens are filled
  • Loading branch information
hardyjosh authored Feb 14, 2025
2 parents 13b5567 + 2577865 commit 42f0589
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
if (gui) {
try {
selectTokens = await gui.getSelectTokens();
selectTokens = gui.getSelectTokens();
return selectTokens;
} catch (e) {
error = DeploymentStepErrors.NO_SELECT_TOKENS;
Expand Down Expand Up @@ -220,6 +220,8 @@
if (gui) {
try {
allTokensSelected = gui?.areAllTokensSelected();
if (!allTokensSelected) return;
const vaultIds = gui?.getVaultIds();
const inputVaultIds = vaultIds?.get('input');
const outputVaultIds = vaultIds?.get('output');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,13 @@
let checking = false;
onMount(async () => {
tokenInfo = await gui?.getTokenInfo(token.key);
if (tokenInfo?.address) {
inputValue = tokenInfo.address;
try {
tokenInfo = await gui?.getTokenInfo(token.key);
if (tokenInfo?.address) {
inputValue = tokenInfo.address;
}
} catch {
// do nothing
}
});
Expand Down

0 comments on commit 42f0589

Please sign in to comment.