Skip to content

Commit

Permalink
🔥 Change isOpenKeplr to isOpenWallet
Browse files Browse the repository at this point in the history
  • Loading branch information
williamchong committed Mar 15, 2024
1 parent 8e6d04b commit 2f06f6d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 19 deletions.
12 changes: 6 additions & 6 deletions components/IscnRegisterForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,7 @@ export default class IscnRegisterForm extends Vue {
isOpenFileInfoDialog = false
isOpenAuthorDialog = false
isOpenWarningSnackbar = false
isOpenKeplr = true
isOpenWallet = true
activeEditingAuthorIndex = -1
isOpenSignDialog = false
Expand Down Expand Up @@ -1018,11 +1018,11 @@ export default class IscnRegisterForm extends Vue {
get buttonState() {
return {
preset: this.isOpenKeplr ? 'tertiary' : 'outline',
text: this.isOpenKeplr
? this.$t('IscnRegisterForm.signDialog.keplr')
preset: this.isOpenWallet ? 'tertiary' : 'outline',
text: this.isOpenWallet
? this.$t('IscnRegisterForm.signDialog.wallet')
: this.$t('IscnRegisterForm.signDialog.retry'),
isDisable: this.isOpenKeplr,
isDisable: this.isOpenWallet,
}
}
Expand Down Expand Up @@ -1318,7 +1318,7 @@ estimation,
onOpenKeplr() {
logTrackerEvent(this, 'ISCNCreate', 'OpenKeplr', '', 1)
this.isOpenKeplr = true
this.isOpenWallet = true
}
validateField(
Expand Down
12 changes: 0 additions & 12 deletions components/IscnUploadForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,6 @@ export default class IscnUploadForm extends Vue {
isOpenFileInfoDialog = false
isOpenSignDialog = false
isOpenWarningSnackbar = false
isOpenKeplr = true
isSizeExceeded = false
isAddISCNPageToEpub = false
Expand Down Expand Up @@ -688,16 +687,6 @@ export default class IscnUploadForm extends Vue {
this.displayExifInfo = this.fileRecords[index].exifInfo
}
onOpenKeplr() {
logTrackerEvent(this, 'ISCNCreate', 'OpenKeplr', '', 1);
this.isOpenKeplr = true
// Hack: In some cases, there might be no response from Keplr,
// so we set a timeout to automatically close it after 5 seconds.
setTimeout(() => {
this.isOpenKeplr = false
}, 5000)
}
async estimateArweaveFee(): Promise<void> {
try {
const results = await Promise.all(
Expand Down Expand Up @@ -783,7 +772,6 @@ export default class IscnUploadForm extends Vue {
logTrackerEvent(this, 'ISCNCreate', 'SubmitToArweave', '', 1);
if (!tempRecord.fileBlob) return;
this.isOpenSignDialog = true;
this.onOpenKeplr();
tempRecord.transactionHash = transactionHash
if (!tempRecord.transactionHash) {
Expand Down
2 changes: 1 addition & 1 deletion locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -259,11 +259,11 @@
"IscnRegisterForm.register.fee": "Fee: {fee} LIKE",
"IscnRegisterForm.signDialog.closeWarning": "Please don't close the window...",
"IscnRegisterForm.signDialog.fee": "Fee",
"IscnRegisterForm.signDialog.keplr": "Opening Keplr ...",
"IscnRegisterForm.signDialog.retry": "Retry",
"IscnRegisterForm.signDialog.sign.arweave.upload": "Please sign to upload to Arweave",
"IscnRegisterForm.signDialog.sign.arweave.uploading": "Depending on the file size, it may take several minutes.\n You will be requested to sign again before finishing.",
"IscnRegisterForm.signDialog.sign.iscn.register": "Please sign to register ISCN record",
"IscnRegisterForm.signDialog.wallet": "Opening Wallet ...",
"IscnRegisterForm.sameAsDialog.title": "Define sameAs URLs",
"IscnRegisterForm.title.editAuthor": "Add Author",
"IscnRegisterForm.title.editStakeholder": "Edit Stakeholder",
Expand Down

0 comments on commit 2f06f6d

Please sign in to comment.