View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0009289 | Taler | wallet-core | public | 2024-10-22 14:07 | 2024-10-22 15:09 |
Reporter | MarcS | Assigned To | Florian Dold | ||
Priority | high | Severity | major | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Target Version | 0.14 | ||||
Summary | 0009289: GetWithdrawalDetailsForAmount: accept ScopeInfo instead of exchangeBaseUrl, and return the baseURL for global scope | ||||
Description | This is the response of getWithdrawalDetailsForAmount: struct WithdrawalDetailsForAmount: Decodable { var amountRaw: Amount // Amount that the user will transfer to the exchange var amountEffective: Amount // Amount that will be added to the user's wallet balance var numCoins: Int? // Number of coins this amountEffective will create var withdrawalAccountsList: [WithdrawalExchangeAccountDetails]? var ageRestrictionOptions: [Int]? // Array of ages var scopeInfo: ScopeInfo var baseURL: String? <<== ADD THIS (OPTIONAL) FIELD (only for global scope) } Since acceptManualWithdrawal takes a baseURL (and not a scope) as input, for global scopes this must return the baseURL of the chosen exchange as additional field. (Can be optional, since for regional exchanges the returned scopeInfo already has the baseURL - no need to pass it twice then) On the other hand, the input for GetWithdrawalDetailsForAmount currently takes a baseURL. Please change that to scopeInfo. export interface GetWithdrawalDetailsForAmountRequest { exchangeBaseUrl: string; <<== DEPRECATE THIS (make it optional) var scopeInfo: ScopeInfo; <<== ADD THIS (optional first, mandatory when baseURL gets removed) amount: AmountString; restrictAge?: number; clientCancellationId?: string; } | ||||
Tags | No tags attached. | ||||
|
When the input amount is zero, currently GetWithdrawalDetailsForAmount returns an error. Please change that and return normal data with amountRaw and amountEffective either also zero, or even better with the minimum amount that can be used as input (depending on the denominations of the exchange). Then the wallets can show the user that amounts smaller than this minimum cannot be transferred. |
|
When it's specified in a request, we call it restrictScope instead of scopeInfo! I've updated the wallet-core docs, should be available any minute. The baseUrl is always returned (always only one exchange per withdrawal transaction), no need to make it optional. I've added a test for getWithdrawalDetailsForAmount with a zero amount. I can't reproduce any crash/exception there. |
Date Modified | Username | Field | Change |
---|---|---|---|
2024-10-22 14:07 | MarcS | New Issue | |
2024-10-22 14:07 | MarcS | Status | new => assigned |
2024-10-22 14:07 | MarcS | Assigned To | => Florian Dold |
2024-10-22 14:15 | MarcS | Note Added: 0023557 | |
2024-10-22 15:09 | Florian Dold | Status | assigned => resolved |
2024-10-22 15:09 | Florian Dold | Resolution | open => fixed |
2024-10-22 15:09 | Florian Dold | Note Added: 0023559 | |
2024-10-22 15:09 | Florian Dold | Target Version | => 0.14 |