proto.eth.tx: add mmid to output; check addrs, amt before signing
This commit is contained in:
parent
ef640d10a9
commit
76a34a05b5
3 changed files with 9 additions and 1 deletions
|
|
@ -1 +1 @@
|
|||
15.1.dev20
|
||||
15.1.dev21
|
||||
|
|
|
|||
|
|
@ -96,6 +96,8 @@ class New(Base, TxBase.New):
|
|||
amt = self.proto.coin_amt(arg.amt or '0'),
|
||||
is_chg = not arg.amt)
|
||||
|
||||
self.add_mmaddrs_to_outputs(ad_f, ad_w)
|
||||
|
||||
def get_unspent_nums_from_user(self, unspent):
|
||||
from ....ui import line_input
|
||||
while True:
|
||||
|
|
|
|||
|
|
@ -74,6 +74,12 @@ class Unsigned(Completed, TxBase.Unsigned):
|
|||
|
||||
o = self.txobj
|
||||
|
||||
m = 'mismatch -- a compromised online installation may have altered your serialized data!'
|
||||
assert o['from'] == self.inputs[0].addr, f'from_addr {m}'
|
||||
if self.outputs:
|
||||
assert o['to'] == self.outputs[0].addr, f'to_addr {m}'
|
||||
assert o['amt'] == self.outputs[0].amt, f'to_amt {m}'
|
||||
|
||||
msg_r(f'Signing transaction{tx_num_str}...')
|
||||
|
||||
try:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue