Skip to content

Commit

Permalink
chore: rename function
Browse files Browse the repository at this point in the history
  • Loading branch information
dhruvkelawala committed Jun 21, 2022
1 parent 468a0bf commit f81a121
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/provider/default.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
TransactionReceiptResponse,
} from '../types';
import { getSelectorFromName } from '../utils/hash';
import { parse, parseAsBig, stringify } from '../utils/json';
import { parse, parseAlwaysAsBig, stringify } from '../utils/json';
import { BigNumberish, bigNumberishArrayToDecimalStringArray, toBN, toHex } from '../utils/number';
import { compressProgram, randomAddress } from '../utils/stark';
import { ProviderInterface } from './interface';
Expand Down Expand Up @@ -167,7 +167,7 @@ export class Provider implements ProviderInterface {
})
.then((res) => {
if (endpoint === 'estimate_fee') {
return parseAsBig(res, (_, v) => {
return parseAlwaysAsBig(res, (_, v) => {
if (v && typeof v === 'bigint') {
return toBN(v.toString());
}
Expand Down
2 changes: 1 addition & 1 deletion src/utils/json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ const json = (alwaysParseAsBig: boolean) => {
};

export const { parse, stringify } = json(false);
export const { parse: parseAsBig, stringify: stringifyAsBig } = json(true);
export const { parse: parseAlwaysAsBig, stringify: stringifyAlwaysAsBig } = json(true);

export default { parse, stringify };

0 comments on commit f81a121

Please sign in to comment.