Browse Source

Fixing import function

simple-signer
Matthew Aaron Raymer 2 years ago
parent
commit
07f763e167
  1. 12
      src/views/ImportAccountView.vue

12
src/views/ImportAccountView.vue

@ -22,10 +22,11 @@
type="text" type="text"
placeholder="Seed Phrase" placeholder="Seed Phrase"
class="block w-full rounded border border-slate-400 mb-4 px-3 py-2" class="block w-full rounded border border-slate-400 mb-4 px-3 py-2"
value="{{ mnemonic }}"
/> />
<div class="mt-8"> <div class="mt-8">
<input <button`
type="submit" @click="import(mnemonic)"
class="block w-full text-center text-lg font-bold uppercase bg-blue-600 text-white px-2 py-3 rounded-md mb-2" class="block w-full text-center text-lg font-bold uppercase bg-blue-600 text-white px-2 py-3 rounded-md mb-2"
value="Import Identity" value="Import Identity"
/> />
@ -48,8 +49,15 @@ import { Options, Vue } from "vue-class-component";
components: {}, components: {},
}) })
export default class ImportAccountView extends Vue { export default class ImportAccountView extends Vue {
mnemonic = "";
public onCancelClick() { public onCancelClick() {
this.$router.back(); this.$router.back();
} }
public import() {
// just to get rid of variability that might cause an error
if (this.mnemonic.trim().length > 0) {
this.mnemonic = this.mnemonic.trim().toLowerCase();
}
}
} }
</script> </script>

Loading…
Cancel
Save