Skip to content

Commit

Permalink
chore: refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
N3TC4T committed Sep 24, 2024
1 parent 6ab0636 commit d497e6f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion src/common/utils/__tests__/fee.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable spellcheck/spell-checker */
import { NormalizeFeeDataSet, PrepareTxForHookFee } from '../fee';

import * as AccountLib from 'xrpl-accountlib';
Expand Down
6 changes: 3 additions & 3 deletions src/services/NetworkService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -331,16 +331,16 @@ class NetworkService extends EventEmitter {
try {
const resp = await this.send<FeeRequest, FeeResponse>({
command: 'fee',
tx_blob: PrepareTxForHookFee(txJson, this.getNetwork().definitions),
tx_blob: PrepareTxForHookFee(txJson, this.getNetwork().definitions, this.getNetworkId()),
});

if ('error' in resp) {
throw new Error(`got error from network ${resp.error}`);
}

resolve(NormalizeFeeDataSet(resp));
} catch (e) {
this.logger.warn('Unable to calculate available network fees:', e);
} catch (error: any) {
this.logger.warn('Unable to calculate available network fees:', error);
reject(new Error('Unable to calculate available network fees!'));
}
});
Expand Down

0 comments on commit d497e6f

Please sign in to comment.