Stacks-wallet-web: [Web Stacks Wallet] Contract post conditions replaced by standard conditions

Created on 22 Feb 2021  ·  9Comments  ·  Source: blockstack/stacks-wallet-web

A tx with contract post condition and standard post conditions are shown in the same way. See screenshot:
Screenshot from 2021-02-22 09-08-38

The contract post condition should mention the contract

P1 🐛 Bug!

Most helpful comment

It's actually worse than this - the current post conditions logic assumed that post conditions could only be applied to the tx-sender. Jude recently updated some wording in this SIP that clears this up. So, the Stacks Wallet actually overwrites every post condition with the current account's STX address.

Related: https://github.com/blockstack/ux/issues/969

All 9 comments

It looks like the contract post condition is replaced by a standard post condition, making it impossible to transfer stx from a contract.
The contract call code below results in two standard post conditions:

Code:
Screenshot from 2021-02-22 09-21-54

Post conditions in explorer:
Screenshot from 2021-02-22 09-19-55

It's actually worse than this - the current post conditions logic assumed that post conditions could only be applied to the tx-sender. Jude recently updated some wording in this SIP that clears this up. So, the Stacks Wallet actually overwrites every post condition with the current account's STX address.

Related: https://github.com/blockstack/ux/issues/969

Can fixing this get a higher priority. This is making it impossible to test ft-transfers using the explorer sandbox or any other app.

I agree that it's important, and we have this bucketed in our highest-priority milestone. But, for testing purposes, you don't have to add post conditions for addresses other than the sender. You should in production, but to get the tx to go through, you only need to add them for the sender.

Removing the contract condition does not help: https://explorer.stacks.co/txid/0xa14334f26ff547516135b5510809dee33db5797c836f8954c0ed45c2fb51f87b?chain=testnet

On https://speed-spend.org/poxlite it is not possible to redeem stingers because the post condition for the sender of STX, i.e. the smart contract can't be specified in the stacks web wallet.

https://github.com/friedger/speed-spend/commit/c3b30b6bdda2637e573d0aa2c06088ba24aaccac

What I'm suggesting is that it would be better for that tx to just have no post conditions at all. Because the tx-sender is not actually transferring any assets, the tx will be successful, even in Deny mode.

What I'm suggesting is that it would be better for that tx to just have no post conditions at all. Because the tx-sender is not actually transferring any assets, the tx will be successful, even in Deny mode.

Can you be more clear?

What I'm suggesting is that it would be better for that tx to just have no post conditions at all. Because the tx-sender is not actually transferring any assets, the tx will be successful, even in Deny mode.

Wait. I will try that. Thanks.

Fixed and released in version 2.3.0 :+1:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

markmhx picture markmhx  ·  27Comments

friedger picture friedger  ·  22Comments

bmayen picture bmayen  ·  7Comments

abusedmedia picture abusedmedia  ·  93Comments

NoelAbrahams picture NoelAbrahams  ·  36Comments