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>
|
<h3>Overview</h3>
|
||||||
<p>{i18n.str`Withdrawal fees: ${withdrawFeeStr}`}</p>
|
<p>{i18n.str`Withdrawal fees: ${withdrawFeeStr}`}</p>
|
||||||
<p>{i18n.str`Rounding loss: ${overheadStr}`}</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>
|
<h3>Coin Fees</h3>
|
||||||
<table className="pure-table">
|
<table className="pure-table">
|
||||||
<thead>
|
<thead>
|
||||||
@ -439,7 +440,7 @@ class ExchangeSelection extends ImplicitStateComponent<ExchangeSelectionProps> {
|
|||||||
{i18n.str`Change Exchange Provider`}
|
{i18n.str`Change Exchange Provider`}
|
||||||
</button>
|
</button>
|
||||||
<br/>
|
<br/>
|
||||||
<Collapsible initiallyCollapsed={true} title="Fee Details">
|
<Collapsible initiallyCollapsed={true} title="Fee and Spending Details">
|
||||||
{renderReserveCreationDetails(this.reserveCreationInfo())}
|
{renderReserveCreationDetails(this.reserveCreationInfo())}
|
||||||
</Collapsible>
|
</Collapsible>
|
||||||
<Collapsible initiallyCollapsed={true} title="Auditor Details">
|
<Collapsible initiallyCollapsed={true} title="Auditor Details">
|
||||||
|
@ -253,6 +253,7 @@ export interface ReserveCreationInfo {
|
|||||||
wireFees: ExchangeWireFeesRecord;
|
wireFees: ExchangeWireFeesRecord;
|
||||||
isAudited: boolean;
|
isAudited: boolean;
|
||||||
isTrusted: boolean;
|
isTrusted: boolean;
|
||||||
|
earliestDepositExpiration: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1377,6 +1377,14 @@ export class Wallet {
|
|||||||
|
|
||||||
let {isTrusted, isAudited} = await this.getExchangeTrust(exchangeInfo);
|
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 = {
|
let ret: ReserveCreationInfo = {
|
||||||
exchangeInfo,
|
exchangeInfo,
|
||||||
selectedDenoms,
|
selectedDenoms,
|
||||||
@ -1385,6 +1393,7 @@ export class Wallet {
|
|||||||
isAudited,
|
isAudited,
|
||||||
isTrusted,
|
isTrusted,
|
||||||
withdrawFee: acc,
|
withdrawFee: acc,
|
||||||
|
earliestDepositExpiration,
|
||||||
overhead: Amounts.sub(amount, actualCoinCost).amount,
|
overhead: Amounts.sub(amount, actualCoinCost).amount,
|
||||||
};
|
};
|
||||||
return ret;
|
return ret;
|
||||||
|
Loading…
Reference in New Issue
Block a user