use MAX_AMOUNT
MODIFY
src/plasma/erc20.ts
src/plasma/erc20.ts
@@ -4,6 +4,7 @@ import { IPlasmaContracts, ITransactionOption } from "../interfaces";
import { BaseToken, Converter, promiseResolve, Web3SideChainClient } from "../utils";
import { PlasmaToken } from "./plasma_token";
import { MATIC_TOKEN_ADDRESS_ON_POLYGON } from "../constant";
+import { MAX_AMOUNT } from "..";
export class ERC20 extends PlasmaToken {
@@ -73,7 +74,7 @@ export class ERC20 extends PlasmaToken {
approveMax(option: ITransactionOption = {}) {
return this.approve(
- '0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff'
+ MAX_AMOUNT
, option
);
}

MODIFY
src/pos/erc20.ts
src/pos/erc20.ts
@@ -5,6 +5,7 @@ import { POSToken } from "./pos_token";
import { TYPE_AMOUNT } from "../types";
import { ExitManager } from "./exit_manager";
import { Log_Event_Signature, ERROR_TYPE } from "../enums";
+import { MAX_AMOUNT } from "..";
export class ERC20 extends POSToken {
@@ -72,7 +73,7 @@ export class ERC20 extends POSToken {
approveMax(option?: ITransactionOption) {
return this.approve(
- '0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff'
+ MAX_AMOUNT
, option
);
}

use MAX_AMOUNT