Fixes how get_contract() uses min_confirmations.
To be clear, 0 confirmations would be considered not being in the blockchain, 1 confirmation is considered as being in the head.
Surprisingly, this hadn't been causing an issue on sandbox. I think the reason is because blocks are produced much faster on sandbox, so by the time the merchant was checking the blockchain, one block had probably elapsed. Without this fix, I got the following error when min_confirmations was 1 or 2. After this fix it worked for both values.
Error: Merchant chose to abort the session
Caused by:
Could not verify contract's origination on chain
Fixes how
get_contract()
usesmin_confirmations
. To be clear, 0 confirmations would be considered not being in the blockchain, 1 confirmation is considered as being in the head.Surprisingly, this hadn't been causing an issue on sandbox. I think the reason is because blocks are produced much faster on sandbox, so by the time the merchant was checking the blockchain, one block had probably elapsed. Without this fix, I got the following error when
min_confirmations
was 1 or 2. After this fix it worked for both values.