//FinixAddress는 finix 토큰 주소입니다
const Kip7 = caver.kct.kip7.create(FinixAddress);
let allowance = new BigNumber(“0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff”);
//myWalletAddress는 내 지갑 주소이고, DfxRouterAddress는 Definix의 Router 주소입니다.
let currentAllowance = await Kip7.allowance(myWalletAddress,DfxRouterAddress);
console.log(“currentAllowance”, currentAllowance);
await Kip7.approve(DfxRouterAddress, allowance,{ from: myWalletAddress });
이 코드를 돌렸을때 currentAllowance는 잘 나오나, approve할때 에러가 발생합니다.
UnhandledPromiseRejectionWarning: TypeError: Cannot read property ‘includes’ of undefined
에러를 타고 들어가보니 트랜잭션 오브젝트를 인식 못한다는? 식의 에러 같습니다.