Skip to content

Commit

Permalink
fix: handle error txFeeInsufficient when claim debio (#814)
Browse files Browse the repository at this point in the history
  • Loading branch information
abdulhakim2902 committed Mar 17, 2023
1 parent 452afb7 commit 33e01ba
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/services/network.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ const nearSeedPhrase = require('near-seed-phrase');
const {polkadotApi, getKeyring} = new PolkadotJs();

interface ClaimReferenceData {
networkId: string;
rpcURL: string;
serverId: string;
accountId: string;
Expand Down Expand Up @@ -158,6 +159,7 @@ export class NetworkService {
const accountId = wallet.id;
const referenceIds = socialMedia.map(e => e.peopleId);
const claimReferenceData = {
networkId: networkId,
rpcURL: wallet.network.rpcURL,
serverId,
accountId,
Expand Down Expand Up @@ -413,7 +415,7 @@ export class NetworkService {
let api: ApiPromise | null = null;

try {
const {serverId, accountId, rpcURL, txFee, referenceIds} =
const {serverId, accountId, rpcURL, txFee, referenceIds, networkId} =
claimReferenceData;

if (isNaN(Number(txFee))) {
Expand Down Expand Up @@ -444,7 +446,7 @@ export class NetworkService {
const serverAdmin = getKeyring().addFromMnemonic(mnemonic);
const currencies = await this.currencyRepository.find({
where: {
networkId: 'myriad',
networkId,
native: false,
},
});
Expand Down

0 comments on commit 33e01ba

Please sign in to comment.