wharfkit / wallet-plugin-cleos

WalletPlugin for the Wharf Session Kit. Allow users to login and sign transactions with cleos cli.
https://wharfkit.com/
Other
0 stars 1 forks source link

Adds `cosign` without signature #2

Open DenisCarriere opened 1 year ago

DenisCarriere commented 1 year ago

When using cleos plugin + cosign transaction plugin, the action payload will cause a conflict since it doesn't contain the cosigner signature.

@aaroncox any thoughts on this?

cleos -u https://eos.greymass.com push transaction '{
    "expiration": "2023-09-10T03:53:44",
    "ref_block_num": 22818,
    "ref_block_prefix": 1891587786,
    "max_net_usage_words": 0,
    "max_cpu_usage_ms": 0,
    "delay_sec": 0,
    "context_free_actions": [],
    "actions": [
        {
            "account": "cpu.pomelo",
            "name": "noop",
            "authorization": [
                {
                    "actor": "cpu.pomelo",
                    "permission": "cosign"
                }
            ],
            "data": {}
        },
        {
            "account": "play.pomelo",
            "name": "transfer",
            "authorization": [
                {
                    "actor": "denis.gm",
                    "permission": "active"
                }
            ],
            "data": {
                "from": "denis.gm",
                "to": "d.w.pomelo",
                "quantity": "10.5000 PLAY",
                "memo": "234f441ecbb1"
            }
        }
    ],
    "transaction_extensions": []
}'
aaroncox commented 1 year ago

I'm not sure you can actually append additional signatures when using the cleos push transaction call 🤔

I dug through the documentation and didn't see any mention of it. Are you aware of any way we could add that additional signature to the payload for cleos?

If there is none, maybe this is a good feature request for cleos development.

DenisCarriere commented 1 year ago

I'm not aware of any "append signature"

Yes it would be a good feature to include

For now I guess it's fine, the user can remove the cosign action by manually editing

Unless there's a way to ignore cosigner for only cleos plugin

aaroncox commented 1 year ago

There's not currently a way, but that's a good flag to potentially have on a wallet plugin.

Added an issue for tracking here: https://github.com/wharfkit/session/issues/76

DenisCarriere commented 1 year ago

Perfect! 👍 will be useful