* various fixes * load gradient with priority * gradient improvements * bit of opacity fading in * does not need fading with priority set * move newsletter section * revert some dynamic stuff * add a timeout to privacy notice to prevent flash
17 lines
408 B
TypeScript
17 lines
408 B
TypeScript
import { BigNumber } from "ethers";
|
|
|
|
export function bigNumberReplacer(_key: string, value: any) {
|
|
// if we find a BigNumber then make it into a string (since that is safe)
|
|
if (
|
|
BigNumber.isBigNumber(value) ||
|
|
(typeof value === "object" &&
|
|
value !== null &&
|
|
value.type === "BigNumber" &&
|
|
"hex" in value)
|
|
) {
|
|
return BigNumber.from(value).toString();
|
|
}
|
|
|
|
return value;
|
|
}
|