uport-connect
uport-connect copied to clipboard
sendTransaction will not send more than 0.001 ether
If I pass sendTransaction
an object with the value
parameter of type string
larger than "1000000000000000"
(0.001 ether), I do not receive a sign transaction notification on the uPort mobile app. Scanning the QR code does not prompt the transaction signing window on the app, either.
One of my major gripes in debugging this has been that I cannot find a detailed description of the sendTransaction
function's expected txObj
parameter anywhere. Is string
the only DataType accepted by the value
parameter, if so, how can I pass a larger value than 0.001 ether?
I've pasted some of my code below. The addresses are dynamic, so I've left them out. This is on the Rinkeby network.
In package.json
:
"uport-connect": "^1.1.2",
"web3": "^1.0.0-beta.37",
In application:
import { Connect } from 'uport-connect'
import Web3 from 'web3'
const uport = new Connect(
'Test_Local_3',
{
description: 'testing?',
network: 'rinkeby',
})
const provider = uport.getProvider() //uport subprovider
const web3 = new Web3(provider)
let value = web3.utils.toWei('1', 'ether')
let transaction = {
from : [ user's address ],
to: [ destination address ],
value: value, //also fails with string > "1000000000000000" inline
appName: 'Test_Local_3',
}
web3.eth.sendTransaction(transaction, (err, res)=>{
//do stuff...
})
Again, the problem is that when sending a transaction with a smaller string I can bring up the transaction my uPort mobile app and approve/send funds. With a big string, I can't get the mobile app to bring up the transaction at all.
To Reproduce
1- Login into application using uPort, sharing wallet credentials with the application
2- Call sendTransaction
on those credentials with a value
prop greater than "1000000000000000"
3- The mobile app notification/QR code does not bring up approval. Application front end receives no response from mobile app.
Expected behavior
1 - Documentation of the sendTransaction
function params, including (and especially) a description of the transaction object.
2 - sendTransaction
should be able to move any amount of ether
Desktop (please complete the following information):
- OS: [macOS Mojave]
- Browsers [Chrome, Safari]
- Versions [72.0, 12.0.2]
Smartphone (please complete the following information):
- Device: [iPhone8+]
- OS: [iOS 12.1.2]
- uPort Version [405]
Really would appreciate any help/guidance from people who may have encountered similar issues.
Hi Nathan,
Thanks for reaching out about this issue. Would you be able to update to the most current libraries and mobile app? We haven't been able to reproduce the issue on our end, so the update is likely to help resolve it.
Please let us know if you are still experiencing issues. Or have additional questions.
Best, Garrett