Skip to content

Commit

Permalink
hot fix claim voucher
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-son12 committed Dec 8, 2022
1 parent ba6f370 commit b518fee
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/app/pages/home/home.ts
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ export class HomePage {
if (!_.isEmpty(wallet)) {
let message = 'Loading...';
let claimWalletAddress = '';
let codeClaimSplit = claimCode ? claimCode.replace('lixi_','') : '';
let codeClaimSplit = claimCode?.value ? claimCode?.value.replace('lixi_','') : '';
this.loadingProvider.simpleLoader(message);
await this.walletProvider
.getAddress(wallet, false)
Expand All @@ -596,9 +596,11 @@ export class HomePage {
claimAddress: claimWalletAddress,
claimCode: codeClaimSplit
}
this.logger.info('Body claim', bodyClaim);
// Call provider to claim xpi from lixilotus/api
await this.lixiLotusProvider.claimVoucher(bodyClaim)
.then(async (data) => {
this.logger.info('Response claim', data);
const copayerModal = await this.modalCtrl.create({
component: ClaimVoucherModalComponent,
componentProps: {
Expand All @@ -616,6 +618,7 @@ export class HomePage {
});
})
.catch(err => {
this.logger.error('Response claim err', err);
const infoSheet = this.actionSheetProvider.createInfoSheet(
'process-fail-voucher'
);
Expand Down

0 comments on commit b518fee

Please sign in to comment.