proto.vm.tx.new: check data arg with DataOutput
This commit is contained in:
parent
f94fede3a2
commit
7d31c25a20
1 changed files with 4 additions and 3 deletions
|
|
@ -43,9 +43,10 @@ class New:
|
|||
async def process_cmdline_args(self, cmd_args, ad_f, ad_w):
|
||||
|
||||
def process_data_arg(arg):
|
||||
assert arg.startswith('data:'), f'{arg}: invalid data arg (must start with "data:")'
|
||||
self.swap_memo = arg.removeprefix('data:')
|
||||
self.set_gas_with_data(self.swap_memo.encode())
|
||||
from ....tx.data_output import DataOutput
|
||||
res = DataOutput(self.proto, arg) # test data for validity
|
||||
self.swap_memo = str(res)
|
||||
self.set_gas_with_data(res)
|
||||
|
||||
match len(cmd_args):
|
||||
case 1:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue