Conversation
* Remove initial `r`, `s` and `v` values from the unsigned transaction for Ledger and Trezor * Add `bigNumberToHexString` util * Update Ledger packages (minor version)
rdig
left a comment
There was a problem hiding this comment.
Code-wise I'm all good with the changes.
But on the functional side, I don't think it works as it should.
The error I'm getting in the dApp is: insufficient funds for gas * price + value
From what I gather either the gas price or the gas value isn't passed correctly to the ledger wallet transaction:
Here's the relevant redux state:
{
list: {
'0sxpkzs1cdu': {
context: 'network',
createdAt: '2019-08-12T12:36:32.435Z',
error: {
type: 'SEND',
message: 'insufficient funds for gas * price + value'
},
from: '0x0E07a4D6164E37e4d04d306c2e5322e268EbFEC8',
gasLimit: '259155',
gasPrice: '3b9aca00',
group: {
key: 'transaction.batch.createUser',
id: '0sxpkzs1cdu',
index: 0
},
id: '0sxpkzs1cdu',
methodName: 'registerUserLabel',
options: {},
params: {
username: 'r',
orbitDBPath: '/orbitdb/zdpuApJ1wvTuQHFR1mpHNpavVuFnGh7XB3xcjMPg8A9aA7dmH/network.1.userProfile.0x0E07a4D6164E37e4d04d306c2e5322e268EbFEC8'
},
status: 'FAILED',
loadingRelated: false
},
kv4ac8cy1l: {
context: 'network',
createdAt: '2019-08-12T12:38:19.717Z',
error: {
type: 'SEND',
message: 'insufficient funds for gas * price + value'
},
from: '0x0E07a4D6164E37e4d04d306c2e5322e268EbFEC8',
gasLimit: '259155',
gasPrice: '77359400',
group: {
key: 'transaction.batch.createUser',
id: 'kv4ac8cy1l',
index: 0
},
id: 'kv4ac8cy1l',
methodName: 'registerUserLabel',
options: {},
params: {
username: 'r',
orbitDBPath: '/orbitdb/zdpuApJ1wvTuQHFR1mpHNpavVuFnGh7XB3xcjMPg8A9aA7dmH/network.1.userProfile.0x0E07a4D6164E37e4d04d306c2e5322e268EbFEC8'
},
status: 'FAILED',
loadingRelated: false
},
glau9e29esu: {
context: 'network',
createdAt: '2019-08-12T12:43:55.709Z',
error: {
type: 'SEND',
message: 'insufficient funds for gas * price + value'
},
from: '0x0E07a4D6164E37e4d04d306c2e5322e268EbFEC8',
gasLimit: '259155',
gasPrice: '77359400',
group: {
key: 'transaction.batch.createUser',
id: 'glau9e29esu',
index: 0
},
id: 'glau9e29esu',
methodName: 'registerUserLabel',
options: {},
params: {
username: 'r',
orbitDBPath: '/orbitdb/zdpuApJ1wvTuQHFR1mpHNpavVuFnGh7XB3xcjMPg8A9aA7dmH/network.1.userProfile.0x0E07a4D6164E37e4d04d306c2e5322e268EbFEC8'
},
status: 'FAILED',
loadingRelated: false
}
}
}
Exactly the same thing happening on the Trezor side:
Note: this is not about the wallet's balance, since both my trezor and ledger have about ~0.003 ETH, which is more the enough to cover this transaction
| const lastArgIndex: number = args.length - 1; | ||
| const options: * = args[lastArgIndex]; | ||
| const [message]: [string] = args; | ||
| const [message] = args; |
There was a problem hiding this comment.
I got tripped up by this too, at some point 👍
|
|


This PR makes some changes to the
purser-ledgerandpurser-trezorpackages (necessitating some small changes topurser-core) such that the seeded signature values for the transaction to be signed (i.e.r,sandv) are not included. This is becauseethereumjs-txmakes validations for EIP-155 that read these values (if present) and compare them with the chain ID, which was leading to validation errors for mainnet transactions.Changes
r,sandvvalues from the unsigned transaction for Ledger and TrezorbigNumberToHexStringutil