show earliest deposit expiration when withdrawing
This commit is contained in:
parent
d6bf24902a
commit
89067a16dd
@ -194,6 +194,7 @@ function renderReserveCreationDetails(rci: ReserveCreationInfo|null) {
|
||||
<h3>Overview</h3>
|
||||
<p>{i18n.str`Withdrawal fees: ${withdrawFeeStr}`}</p>
|
||||
<p>{i18n.str`Rounding loss: ${overheadStr}`}</p>
|
||||
<p>{i18n.str`Earliest expiration (for deposit): ${moment.unix(rci.earliestDepositExpiration).fromNow()}`}</p>
|
||||
<h3>Coin Fees</h3>
|
||||
<table className="pure-table">
|
||||
<thead>
|
||||
@ -439,7 +440,7 @@ class ExchangeSelection extends ImplicitStateComponent<ExchangeSelectionProps> {
|
||||
{i18n.str`Change Exchange Provider`}
|
||||
</button>
|
||||
<br/>
|
||||
<Collapsible initiallyCollapsed={true} title="Fee Details">
|
||||
<Collapsible initiallyCollapsed={true} title="Fee and Spending Details">
|
||||
{renderReserveCreationDetails(this.reserveCreationInfo())}
|
||||
</Collapsible>
|
||||
<Collapsible initiallyCollapsed={true} title="Auditor Details">
|
||||
|
@ -253,6 +253,7 @@ export interface ReserveCreationInfo {
|
||||
wireFees: ExchangeWireFeesRecord;
|
||||
isAudited: boolean;
|
||||
isTrusted: boolean;
|
||||
earliestDepositExpiration: number;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1377,6 +1377,14 @@ export class Wallet {
|
||||
|
||||
let {isTrusted, isAudited} = await this.getExchangeTrust(exchangeInfo);
|
||||
|
||||
let earliestDepositExpiration = Infinity;;
|
||||
for (let denom of selectedDenoms) {
|
||||
let expireDeposit = getTalerStampSec(denom.stampExpireDeposit)!;
|
||||
if (expireDeposit < earliestDepositExpiration) {
|
||||
earliestDepositExpiration = expireDeposit;
|
||||
}
|
||||
}
|
||||
|
||||
let ret: ReserveCreationInfo = {
|
||||
exchangeInfo,
|
||||
selectedDenoms,
|
||||
@ -1385,6 +1393,7 @@ export class Wallet {
|
||||
isAudited,
|
||||
isTrusted,
|
||||
withdrawFee: acc,
|
||||
earliestDepositExpiration,
|
||||
overhead: Amounts.sub(amount, actualCoinCost).amount,
|
||||
};
|
||||
return ret;
|
||||
|
Loading…
Reference in New Issue
Block a user