Skip to content

Commit

Permalink
Merge pull request #111 from bcProFoundation/ericson-hot-fix-claim-vo…
Browse files Browse the repository at this point in the history
…ucher

hot fix claim voucher
  • Loading branch information
kensauruss authored Dec 8, 2022
2 parents ba6f370 + b518fee commit e33fa78
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 e33fa78

Please sign in to comment.