simpleledger / Electron-Cash-SLP

Electron Cash for SLP Tokens
https://simpleledger.cash/project/electron-cash-slp-edition/
MIT License
64 stars 53 forks source link

paytomany_slp CLI (LINUX) seems broken, same results using 3.6.6 or git - TypeError: unsupported operand type(s) for +: 'int' and 'str' #209

Closed abclution closed 2 years ago

abclution commented 3 years ago

Setup the transaction, it prompts me for the wallet pw.

And then promptly, somewhere tries to add abc to 123, somewhere.

git version

bitcoin-cash@MONERO-D:~/Electron-Cash-SLP-GIT$ python3 -W ignore ./electron-cash -v paytomany_slp dd21be4532d93661e8ffe16db6535af0fb8ee1344d1fef81a193e2b4cfa9fbc9 "[[\"simpleledger:qz6ke7eqls7mssusadcvduqgw29py2vj8cw3ku06am\",0.0042069],[\"simpleledger:qrsxhpsw69kjndlt7se5h78l3e5k4xn59v2dpuxrxl\",0.0042069],[\"simpleledger:qpn2f5722h33nenrlye57pc5lasgykkc3srq5xrcn4\",0.0042069]]" -w /home/bitcoin-cash/.electron-cash/wallets/SLP_KANSAS_wallet_flexusd
|  4.128| |00| [SimpleConfig] electron-cash directory /home/bitcoin-cash/.electron-cash-slp
|  4.128| |00| [get_server] [Errno 2] No such file or directory: '/home/bitcoin-cash/.electron-cash-slp/daemon'
|  4.129| |00| [SimpleConfig] electron-cash directory /home/bitcoin-cash/.electron-cash-slp
|  4.129| |00| [WalletStorage] wallet path /home/bitcoin-cash/.electron-cash/wallets/SLP_KANSAS_wallet_flexusd
Password:
| 11.752| |00| [Plugins] registering hardware digitalbitbox: ('hardware', 'digitalbitbox', 'Digital Bitbox wallet')
| 11.810| |00| [Plugins] registering hardware keepkey: ('hardware', 'keepkey', 'KeepKey wallet')
| 11.829| |00| [Plugins] registering hardware ledger: ('hardware', 'ledger', 'Ledger wallet')
| 11.831| |00| [Plugins] registering hardware trezor: ('hardware', 'trezor', 'TREZOR wallet')
| 11.847| |00| [Plugins] Job added <electroncash.plugins.DeviceMgr object at 0x7fd457e3cf28>
| 11.847| |00| [profiler] Plugins.__init__ 0.1488
| 11.848| |00| [WalletStorage] wallet path /home/bitcoin-cash/.electron-cash/wallets/SLP_KANSAS_wallet_flexusd
| 12.178| |00| [profiler] WalletStorage.decrypt 0.3146
| 12.197| |00| [profiler] Abstract_Wallet.load_transactions 0.0080
| 12.198| |00| [profiler] Abstract_Wallet.build_reverse_history 0.0001
| 12.198| |00| [profiler] Abstract_Wallet.check_history 0.0004
Traceback (most recent call last):
  File "./electron-cash", line 594, in <module>
    main()
  File "./electron-cash", line 586, in main
    result = run_cmdline(config, config_options, cmdname)
  File "./electron-cash", line 434, in run_cmdline
    result = run_offline_command(config, config_options)
  File "./electron-cash", line 339, in run_offline_command
    result = func(*args, **kwargs)
  File "/home/bitcoin-cash/Electron-Cash-SLP-GIT/electroncash/commands.py", line 111, in func_wrapper
    return func(*args, **kwargs)
  File "/home/bitcoin-cash/Electron-Cash-SLP-GIT/electroncash/commands.py", line 731, in paytomany_slp
    amount_slp = get_satoshis_nofloat(str(sum([o[1] for o in outputs])), decimals)
TypeError: unsupported operand type(s) for +: 'int' and 'str'
| 12.265| |01| [Plugins] stopped
| 12.265| |00| GraphContext_NFT1/ValidationJobManager finalized
| 12.313| |00| [Slp_Standard_Wallet/SLP_KANSAS_wallet_flexusd] finalized
| 12.313| |00| [SLP_KANSAS_wallet_flexusd.CashAcct] finalized

alternate escaping

python3 -W ignore ./electron-cash -v paytomany_slp dd21be4532d93661e8ffe16db6535af0fb8ee1344d1fef81a193e2b4cfa9fbc9 '[["simpleledger:qz6ke7eqls7mssusadcvduqgw29py2vj8cw3ku06am",0.001],["simpleledger:qpewtu4jng2evntzxe2wudckhc363p7zlumgl6sgdd",0.001]]' -w /home/bitcoin-cash/.electron-cash/wallets/SLP_KANSAS_wallet_flexusd
|  4.298| |00| [SimpleConfig] electron-cash directory /home/bitcoin-cash/.electron-cash-slp
|  4.298| |00| [get_server] [Errno 2] No such file or directory: '/home/bitcoin-cash/.electron-cash-slp/daemon'
|  4.298| |00| [SimpleConfig] electron-cash directory /home/bitcoin-cash/.electron-cash-slp
|  4.299| |00| [WalletStorage] wallet path /home/bitcoin-cash/.electron-cash/wallets/SLP_KANSAS_wallet_flexusd
Password:
| 12.761| |00| [Plugins] registering hardware digitalbitbox: ('hardware', 'digitalbitbox', 'Digital Bitbox wallet')
| 12.886| |00| [Plugins] registering hardware keepkey: ('hardware', 'keepkey', 'KeepKey wallet')
| 12.927| |00| [Plugins] registering hardware ledger: ('hardware', 'ledger', 'Ledger wallet')
| 12.929| |00| [Plugins] registering hardware trezor: ('hardware', 'trezor', 'TREZOR wallet')
| 12.930| |00| [Plugins] Job added <electroncash.plugins.DeviceMgr object at 0x7f25bd14ea20>
| 12.931| |00| [profiler] Plugins.__init__ 0.2980
| 12.931| |00| [WalletStorage] wallet path /home/bitcoin-cash/.electron-cash/wallets/SLP_KANSAS_wallet_flexusd
| 13.262| |00| [profiler] WalletStorage.decrypt 0.3102
| 13.282| |00| [profiler] Abstract_Wallet.load_transactions 0.0081
| 13.283| |00| [profiler] Abstract_Wallet.build_reverse_history 0.0001
| 13.283| |00| [profiler] Abstract_Wallet.check_history 0.0003
Traceback (most recent call last):
  File "./electron-cash", line 594, in <module>
    main()
  File "./electron-cash", line 586, in main
    result = run_cmdline(config, config_options, cmdname)
  File "./electron-cash", line 434, in run_cmdline
    result = run_offline_command(config, config_options)
  File "./electron-cash", line 339, in run_offline_command
    result = func(*args, **kwargs)
  File "/home/bitcoin-cash/Electron-Cash-SLP-GIT/electroncash/commands.py", line 111, in func_wrapper
    return func(*args, **kwargs)
  File "/home/bitcoin-cash/Electron-Cash-SLP-GIT/electroncash/commands.py", line 731, in paytomany_slp
    amount_slp = get_satoshis_nofloat(str(sum([o[1] for o in outputs])), decimals)
TypeError: unsupported operand type(s) for +: 'int' and 'str'
| 13.667| |01| [Plugins] stopped
| 13.668| |00| GraphContext_NFT1/ValidationJobManager finalized
| 13.725| |00| [Slp_Standard_Wallet/SLP_KANSAS_wallet_flexusd] finalized
| 13.725| |00| [SLP_KANSAS_wallet_flexusd.CashAcct] finalized