@syncswap/sdk
Version:
SyncSwap TypeScript SDK for building DeFi applications
13 lines • 386 B
JavaScript
import { BigNumber } from "ethers";
export function reviveFromJSON(key, value) {
let result = value;
if ((typeof value === 'object' && value !== null)
&& (value.hasOwnProperty('type'))) {
switch (value.type) {
case 'BigNumber':
result = BigNumber.from(value.hex);
}
}
return result;
}
//# sourceMappingURL=utils.js.map