View Issue Details

IDProjectCategoryView StatusLast Update
0009289Talerwallet-corepublic2024-12-13 18:15
ReporterMarcS Assigned ToFlorian Dold Resolution deadline
ImplementerReviewer 
Release signed byDeployed by 
VerifierCommunicator 
Data protection authority notification requiredNo  
CSIRT notification requiredNo  
Estimated effort (hours)Actual effort (hours)0 
Fast-trackNo
Work packagenone
PriorityhighSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Target Version0.14Fixed in Version0.14 
Summary0009289: GetWithdrawalDetailsForAmount: accept ScopeInfo instead of exchangeBaseUrl, and return the baseURL for global scope
DescriptionThis 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;
}
TagsNo tags attached.

Required notifications

Address or linkRemarkAdded byNotifiedActions

Activities

MarcS

2024-10-22 12:15

developer   ~0023557

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.

Florian Dold

2024-10-22 13:09

manager   ~0023559

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.

Issue History

Date ModifiedUsernameFieldChange
2024-10-22 12:07MarcSNew Issue
2024-10-22 12:07MarcSStatusnew => assigned
2024-10-22 12:07MarcSAssigned To => Florian Dold
2024-10-22 12:15MarcSNote Added: 0023557
2024-10-22 13:09Florian DoldStatusassigned => informing
2024-10-22 13:09Florian DoldResolutionopen => fixed
2024-10-22 13:09Florian DoldNote Added: 0023559
2024-10-22 13:09Florian DoldTarget Version => 0.14
2024-12-13 00:59Christian GrothoffFixed in Version => 0.14
2024-12-13 18:15Christian GrothoffStatusinforming => closed