set default index param in buildPayloadForExit
MODIFY
src/pos/erc20.ts
src/pos/erc20.ts
@@ -144,7 +144,6 @@ export class ERC20 extends POSToken {
return this.exitUtil.buildPayloadForExit(
burnTransactionHash,
- 0,
eventSignature,
isFast
).then(payload => {

MODIFY
src/pos/erc721.ts
src/pos/erc721.ts
@@ -237,7 +237,6 @@ export class ERC721 extends POSToken {
return this.exitUtil.buildPayloadForExit(
burnTransactionHash,
- 0,
Log_Event_Signature.Erc721Transfer,
false
).then(payload => {
@@ -252,9 +251,9 @@ export class ERC721 extends POSToken {
return this.exitUtil.buildPayloadForExit(
burnTransactionHash,
- index,
Log_Event_Signature.Erc721Transfer,
- false
+ false,
+ index
).then(payload => {
return this.rootChainManager.exit(
payload, option
@@ -286,7 +285,6 @@ export class ERC721 extends POSToken {
return this.exitUtil.buildPayloadForExit(
burnTransactionHash,
- 0,
Log_Event_Signature.Erc721Transfer,
true
).then(payload => {

MODIFY
src/pos/exit_util.ts
src/pos/exit_util.ts
@@ -218,7 +218,7 @@ export class ExitUtil {
});
}
- buildPayloadForExit(burnTxHash: string, index: number, logEventSig: string, isFast: boolean) {
+ buildPayloadForExit(burnTxHash: string, logEventSig: string, isFast: boolean, index: number = 0) {
if (isFast && !service.network) {
new ErrorHelper(ERROR_TYPE.ProofAPINotSet).throw();

MODIFY
src/pos/pos_token.ts
src/pos/pos_token.ts
@@ -76,7 +76,6 @@ export class POSToken extends BaseToken<IPOSClientConfig> {
protected withdrawExitPOS(burnTxHash: string, eventSignature: string, isFast: boolean, option: ITransactionOption) {
return this.exitUtil.buildPayloadForExit(
burnTxHash,
- 0,
eventSignature,
isFast
).then(payload => {

set default index param in buildPayloadForExit