taler
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Taler] Possible bugs: Sending wallet2wallet payment behaves weirdly


From: Florian Dold
Subject: Re: [Taler] Possible bugs: Sending wallet2wallet payment behaves weirdly
Date: Tue, 6 Dec 2022 19:45:51 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0

Thanks, this was indeed a bug and I pushed a fix based on your suggestion.

- Florian

On 12/6/22 01:48, Florian Jung via Taler wrote:
Hi,

On 12/6/22 00:44, Florian Jung via Taler wrote:
First bug: it appears that when I only have one coin (e.g. I tend to withdraw exactly one 10 MANA coin for testing), then I get "insufficient funds" on every attempt to send funds to another wallet. No server request is made.


I got a fix for you (attached, to be applied to wallet-core). Beware: it's untested, because I have zero experience with Typescript and Android development, but this looks like it should fix the problem:

In essence, the wallet-core library went through all coins and did the following (in that order):

  * for all coins do:
      o check if accumulated amount >= desired amount. if so, return success
      o add the coin to the accumulated amount if needed

If the last coin in the wallet, however, is the one who makes "accumulated >= desired", then the "check... if so, return success" is not executed a last time. The fix puts that check to the end of the for loop.

Best regards,

Florian




reply via email to

[Prev in Thread] Current Thread [Next in Thread]