Skip to content
This repository has been archived by the owner on May 10, 2021. It is now read-only.

sendTransaction will not send more than 0.001 ether #264

Open
ntutchton opened this issue Feb 6, 2019 · 1 comment
Open

sendTransaction will not send more than 0.001 ether #264

ntutchton opened this issue Feb 6, 2019 · 1 comment

Comments

@ntutchton
Copy link

ntutchton commented Feb 6, 2019

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.

@Garrett1230
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants