@syncswap/sdk
Version:
SyncSwap TypeScript SDK for building DeFi applications
16 lines • 506 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.reviveFromJSON = reviveFromJSON;
const ethers_1 = require("ethers");
function reviveFromJSON(key, value) {
let result = value;
if ((typeof value === 'object' && value !== null)
&& (value.hasOwnProperty('type'))) {
switch (value.type) {
case 'BigNumber':
result = ethers_1.BigNumber.from(value.hex);
}
}
return result;
}
//# sourceMappingURL=utils.js.map