Agoric / agoric-sdk

monorepo for the Agoric Javascript smart contract platform
Apache License 2.0
327 stars 206 forks source link

smartWallet tryExitOffer requires spend authority #7291

Open dckc opened 1 year ago

dckc commented 1 year ago

Describe the bug

As part of #6930 , I'm trying to cancel a bid with agd tx swingset wallet-action XXX. Since that doesn't require withdrawing from any purses, I thought I wouldn't need the --allow-spend flag. But I get Error: tryExitOffer requires spend authority.

To Reproduce

Send the bridge action in the log below

Expected behavior

tryExit should not need the spend flag.

Platform Environment

ollinet Revision Link: https://github.com/Agoric/agoric-sdk/tree/7989b8857a728c7b7b937077757520f0cadeebde

Additional context

part of #6930

Screenshots

2023-03-31T01:47:15.634Z SwingSet: vat: v25: walletFactory.fromBridge: { action: '{"body":"{\\"method\\":\\"tryExitOffer\\",\\"offerId\\":\\"bid-1680220217218\\"}","slots":[]}', blockHeight: 52242, blockTime: 1680227229, owner: 'agoric140dmkrz2e42ergjj7gyvejhzmjzurvqeq82ang', type: 'WALLET_ACTION' }
2023-03-31T01:47:15.637Z SwingSet: vat: v25: walletFactory: { wallet: Object [Alleged: SmartWallet self] {}, actionCapData: { body: '{"method":"tryExitOffer","offerId":"bid-1680220217218"}', slots: [] } }
2023-03-31T01:47:15.669Z SwingSet: ls: v25: Logging sent error stack (Error#98)
2023-03-31T01:47:15.670Z SwingSet: ls: v25: Error#98: tryExitOffer requires spend authority

cc @turadg

dckc commented 1 year ago

@samsiegart points out: there's a question of whether removing the spend flag means: this action is suitable for use with a background signer (#4406).