@rarible/sdk-common
Advanced tools
Comparing version 0.13.68 to 0.13.69-beta.0
@@ -142,2 +142,3 @@ "use strict"; | ||
"發生內部錯誤", | ||
"User Reject", | ||
].map((msg) => msg.toLowerCase()); | ||
@@ -144,0 +145,0 @@ const shortCancelMessages = ["cancel", "canceled", "cancelled", "rejected"]; |
@@ -48,1 +48,2 @@ export * from "./promise-settled"; | ||
export declare function hasName(x: unknown): x is Error; | ||
export declare function deepReplaceBigInt(o: unknown): any; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.hasName = exports.isObjectLike = exports.getDappType = exports.DappType = exports.getStringifiedData = void 0; | ||
exports.deepReplaceBigInt = exports.hasName = exports.isObjectLike = exports.getDappType = exports.DappType = exports.getStringifiedData = void 0; | ||
const tslib_1 = require("tslib"); | ||
@@ -161,1 +161,17 @@ tslib_1.__exportStar(require("./promise-settled"), exports); | ||
exports.hasName = hasName; | ||
function deepReplaceBigInt(o) { | ||
if (Array.isArray(o)) { | ||
return o.map(item => deepReplaceBigInt(item)); | ||
} | ||
if (typeof o === "object") { | ||
const clonedObject = Object.assign({}, o); | ||
return Object.keys(clonedObject).reduce((acc, key) => { | ||
acc[key] = deepReplaceBigInt(acc[key]); | ||
return acc; | ||
}, clonedObject); | ||
} | ||
if (typeof o === "bigint") | ||
return o.toString(); | ||
return o; | ||
} | ||
exports.deepReplaceBigInt = deepReplaceBigInt; |
{ | ||
"name": "@rarible/sdk-common", | ||
"version": "0.13.68", | ||
"version": "0.13.69-beta.0", | ||
"homepage": "", | ||
@@ -34,3 +34,3 @@ "license": "ISC", | ||
}, | ||
"gitHead": "f4009c600d4bf3108163e810ebcfc17f3f033398" | ||
"gitHead": "d83138e0b99a90017a7dcd6b757d1361e77c1a7f" | ||
} |
32190
736