View Issue Details

IDProjectCategoryView StatusLast Update
0006707Talerwallet (Android App)public2022-11-04 20:52
ReporterFlorian Dold Assigned Togrote  
PriorityhighSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Target Version0.9 
Summary0006707: implement deposits to bank accounts (android)
DescriptionThe android wallet should support deposits to bank accounts.

There's two parts:

1. Rendering the new "deposit" transaction history item (https://git.taler.net/wallet-core.git/tree/packages/taler-wallet-core/src/types/transactionsTypes.ts#n317)

2. Allowing the user to scan a payto:// QR code and select a currenct/amount to send to this account. (API: https://docs.taler.net/taler-wallet.html#deposits)
TagsNo tags attached.

Activities

grote

2022-09-20 19:05

developer   ~0019158

Is there a way to test this? E.g. how to create a payto:// QR code for a deposit?

Christian Grothoff

2022-09-22 15:34

manager   ~0019169

Well, the payto:// QR code is trivial, just use

payto://iban/SANDBOXX/$IBAN?receiver-name=egal

Where you can take $IBAN from the "Welcome, xx ($IBAN)!" message of the bank.demo.taler.net after you create an account there.

grote

2022-09-23 19:18

developer   ~0019176

Getting

1006 The signature of the denomination key over the coin is not valid.

from wallet-core when trying the "createDepositGroup" API request.

grote

2022-09-23 19:30

developer   ~0019177

Would be nice to also document this new transaction type here: https://docs.taler.net/taler-wallet.html#tsref-type-TransactionType

grote

2022-10-26 15:10

developer   ~0019307

> payto://iban/SANDBOXX/$IBAN?receiver-name=egal

Where does the SANDBOXX come from? Should all payto:// URIs forever include that name there?

Christian Grothoff

2022-10-26 15:15

manager   ~0019308

sandboxx is the BIC we use for the libeufin sandbox. For real banks, you'd have a real BIC code here. Also, the BIC is optional according to RFC 8905.

grote

2022-10-26 16:22

developer   ~0019309

So the form for the user should show a field for IBAN and one for BIC, with maybe the BIC pre-filled for now with SANDBOXX?

Christian Grothoff

2022-10-26 18:11

manager   ~0019310

No, please don't pre-fill the BIC, at best pre-fill with "payto://iban/", but not with more.

grote

2022-10-27 15:07

developer   ~0019311

The Deposit API uses AmountJson instead of AmountString which is used everywhere. When working around this, I get this response:

{
  "type": "response",
  "operation": "prepareDeposit",
  "id": 186,
  "result": {
    "totalDepositCost": {
      "currency": "KUDOS",
      "value": 1,
      "fraction": 10000000
    },
    "effectiveDepositAmount": {
      "currency": "KUDOS",
      "value": 0,
      "fraction": 98000000
    }
  }
}

which I understand as out of my 1 KUDOS, only 0.98 KUDOS will be deposited, because there is a 0.02 KUDOS fee. However, when actually making this deposit, it shows 1.1 KUDOS in my transaction history. Something is off there.

Then, the item in the transaction history also has this error:


   {
    "type": "deposit",
    "id": "deposit:PZ49FMMGFCZ3242XC1NQQMY3AS1RQ6GAJYTFKTVZ27XE57T7KTQ0",
    "isDue": false,
    "timestampDue": {
      "t_ms": 1.666875416609625E12
    },
    "isLongpolling": false,
    "givesLifeness": true,
    "depositGroupId": "PZ49FMMGFCZ3242XC1NQQMY3AS1RQ6GAJYTFKTVZ27XE57T7KTQ0",
    "lastError": {
      "code": 7005,
      "hint": "Unexpected HTTP status 400 in response",
      "requestUrl": "https:\/\/exchange.demo.taler.net\/coins\/DATV375JQQGSV6BBP8B5373CTPHG6AYZRXQV6T0G8T2NCHMK4NK0\/deposit",
      "httpStatusCode": 400,
      "errorResponse": {
        "code": 26,
        "hint": "A parameter in the request was malformed.",
        "detail": "Country code `ch' not supported\n"
      }
    },
    "retryInfo": {
      "firstTry": {
        "t_ms": 1666875362948
      },
      "nextRetry": {
        "t_ms": 1.666875416609625E12
      },
      "retryCounter": 6
    }
  }

grote

2022-10-27 15:09

developer   ~0019312

Ah wait, the amounts are confusing. So if I tell it to deposit 1 KUDOS, it will take 1.1 KUDOS from my account, but only deposit 0.98 KUDOS? So taking a 0.12 fee? Is this behavior in line with how the wallet behaves elsewhere?

Florian Dold

2022-10-27 15:58

manager   ~0019313

The amounts are indeed confusing, because there are three amounts involved:

1. what the user has requested (instructed amount)
2. what will be deducted from the wallet's balance (totalDepositCost)
3. what will end up on the bank account after the exchange deducts wire fees (effectiveDepositAmount)

I think wallet-core should be smarter here and compute the coin selection such that the instructed amount either corresponds to #1 or #2.

Regarding the amounts: Should we move everything to amount strings? I also noticed that we use the JSON and string amounts inconsistently. Torsten, is it okay for you if we move to strings *everywhere* in the wallet-core API?

grote

2022-10-27 16:01

developer   ~0019314

> I think wallet-core should be smarter here and compute the coin selection such that the instructed amount either corresponds to #1 or #2.

I agree!

> is it okay for you if we move to strings *everywhere* in the wallet-core API?

Yes, all API endpoints that I use in the Android wallet so far use amount strings.

What about the "Unexpected HTTP status 400 in response" "Country code `ch' not supported\n" ? Is there a recommended way to test that deposits are actually working?

Florian Dold

2022-10-31 17:27

manager   ~0019321

I've released wallet-core v0.9.0-dev.31 to address the JSON amount issue.

With demo.taler.net, I'm able to do deposits with the taler-wallet-cli. You need to use a payto:// URI in the IBAN format, such as 'payto://iban/DE371049?receiver-name=Torsten'. (Any valid-looking IBAN works for testing, but you'd get that from the demobank-ui at bank.demo.taler.net).

grote

2022-11-03 15:50

developer   ~0019351

this is now implemented and works against (current!) demo bank

Issue History

Date Modified Username Field Change
2021-01-18 23:42 Florian Dold New Issue
2021-01-18 23:42 Florian Dold Status new => assigned
2021-01-18 23:42 Florian Dold Assigned To => grote
2022-09-20 19:05 grote Note Added: 0019158
2022-09-22 15:34 Christian Grothoff Note Added: 0019169
2022-09-23 19:18 grote Note Added: 0019176
2022-09-23 19:30 grote Note Added: 0019177
2022-10-20 10:55 Christian Grothoff Assigned To grote => Florian Dold
2022-10-20 10:55 Christian Grothoff Priority normal => high
2022-10-20 10:55 Christian Grothoff Target Version => 0.9
2022-10-26 15:10 grote Note Added: 0019307
2022-10-26 15:15 Christian Grothoff Note Added: 0019308
2022-10-26 16:22 grote Note Added: 0019309
2022-10-26 18:11 Christian Grothoff Note Added: 0019310
2022-10-27 15:07 grote Note Added: 0019311
2022-10-27 15:09 grote Note Added: 0019312
2022-10-27 15:58 Florian Dold Note Added: 0019313
2022-10-27 16:01 grote Note Added: 0019314
2022-10-31 17:27 Florian Dold Note Added: 0019321
2022-10-31 17:27 Florian Dold Assigned To Florian Dold => grote
2022-11-03 15:50 grote Status assigned => resolved
2022-11-03 15:50 grote Resolution open => fixed
2022-11-03 15:50 grote Note Added: 0019351
2022-11-04 20:52 Christian Grothoff Status resolved => closed