uport-connect
uport-connect copied to clipboard
"Error: The field to must have byte length of 20"
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: