uport-connect icon indicating copy to clipboard operation
uport-connect copied to clipboard

"Error: The field to must have byte length of 20"

Open aijdissanayake opened this issue 6 years ago • 0 comments

I'm trying to do a contract interaction with a contract deployed in ropsten test net and I'm getting the above error in the mobile app.

Dapp client side code: (according to the documentation at https://www.npmjs.com/package/uport-connect#quick-start )

import { Connect } from "uport-connect";
import registerResolver from 'ethr-did-resolver';
registerResolver();

const uport = new Connect('Test App 1', {
    network: "ropsten"
});

const approve = async (did) => {
    const uTokenContract = uport.contract(tokenContractABI).at(tokenContractAddress);
    await uTokenContract.approve(ServiceContractAddress, 10000, 'approveReq');
    await uport.onResponse('approveReq').then(payload => {
        const txId = payload.res;
        console.log(txId);
    });
};

Screenshot of the error in mobile app: 51790088_311710029486437_8631397639339900928_n

aijdissanayake avatar Feb 12 '19 09:02 aijdissanayake