Skip to content

Commit

Permalink
🚸 Show Keplr error if Keplr not found in iscn-ar
Browse files Browse the repository at this point in the history
  • Loading branch information
williamchong committed Mar 29, 2022
1 parent 3f49be1 commit b1282fd
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions pages/in/widget/iscn-ar/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,13 @@
>{{ $t('ISCNARWidget.ISCN.action') }}</div>
</header>

<div
v-if="error"
class="likepay-panel__section-meta"
>
{{ error }}
</div>

<div class="likepay-panel__section-meta">
<div class="likepay-panel__section-meta-label"> {{ $t('ISCNARWidget.ISCN.articleTitleTitle') }} </div>
<div style="margin-top: 10px"> <p> {{ $t('ISCNARWidget.ISCN.articleTitleValue', { title: iscnName }) }} </p> </div>
Expand Down Expand Up @@ -729,8 +736,10 @@ export default {
this.beginLikePay();
},
async connectKeplr() {
this.error = '';
const res = await Keplr.initKeplr();
if (!res) {
this.error = 'FAILED_CONNECT_TO_KEPLR';
throw new Error('FAILED_CONNECT_TO_KEPLR');
}
this.setDefaultCosmosWalletSource({ source: 'keplr', persistent: false });
Expand Down

0 comments on commit b1282fd

Please sign in to comment.