Skip to content

Commit

Permalink
Merge pull request #453 from torusresearch/feat/import-token-popup
Browse files Browse the repository at this point in the history
fix: import token
  • Loading branch information
guru-web3 authored Nov 15, 2024
2 parents 15ee046 + 7c3cc65 commit 2031836
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/home/ImportToken.vue
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ function setImportTokenState(contractAddress: string, name: string, symbol: stri
function resetState() {
setImportTokenState("", "", "", true);
$v.value.$rese$t();
$v.value.$reset();
}
const onCancel = () => {
Expand Down
10 changes: 10 additions & 0 deletions src/components/home/ImportTokenConfirmation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ import { ref } from "vue";
import { Button } from "@/components/common";
import ControllerModule from "@/modules/controllers";
const props = withDefaults(
defineProps<{
isOpen?: boolean;
importDisabled?: boolean;
}>(),
{
isOpen: false,
importDisabled: false,
}
);
const emits = defineEmits(["importConfirm", "importCanceled", "onCloseModal"]);
const closeModal = () => {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/wallet/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const importConfirm = async (importToken: CustomTokenInfo) => {
};
// if present show dialog to import token
if (result && result.address) {
customToken.value = { ...result, network: result.chainId };
customToken.value = { ...result, network: result.chainId.toString(), publicAddress: result.address };
isImportConfirmationOpen.value = true;
} else {
await importTokenCall(tokenInfo);
Expand Down

0 comments on commit 2031836

Please sign in to comment.