nicely show version if there is a mismatch
This commit is contained in:
parent
289d2cb572
commit
2e48d83b2b
11
src/types.ts
11
src/types.ts
@ -582,6 +582,17 @@ export interface ReserveCreationInfo {
|
|||||||
* Older exchanges don't return version information.
|
* Older exchanges don't return version information.
|
||||||
*/
|
*/
|
||||||
versionMatch: LibtoolVersion.VersionMatchResult|undefined;
|
versionMatch: LibtoolVersion.VersionMatchResult|undefined;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Libtool-style version string for the exchange or "unknown"
|
||||||
|
* for older exchanges.
|
||||||
|
*/
|
||||||
|
exchangeVersion: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Libtool-style version string for the wallet.
|
||||||
|
*/
|
||||||
|
walletVersion: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1645,6 +1645,8 @@ export class Wallet {
|
|||||||
wireFees,
|
wireFees,
|
||||||
wireInfo,
|
wireInfo,
|
||||||
withdrawFee: acc,
|
withdrawFee: acc,
|
||||||
|
exchangeVersion: exchangeInfo.protocolVersion || "unknown",
|
||||||
|
walletVersion: WALLET_PROTOCOL_VERSION,
|
||||||
};
|
};
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -273,16 +273,16 @@ class ExchangeSelection extends ImplicitStateComponent<ExchangeSelectionProps> {
|
|||||||
if (rci.versionMatch.currentCmp === -1) {
|
if (rci.versionMatch.currentCmp === -1) {
|
||||||
return (
|
return (
|
||||||
<p className="errorbox">
|
<p className="errorbox">
|
||||||
Your wallet might be outdated. The exchange has a higher, incompatible
|
Your wallet (protocol version <span>{rci.walletVersion}</span>) might be outdated. The exchange has a higher, incompatible
|
||||||
protocol version.
|
protocol version (<span>{rci.exchangeVersion}</span>).
|
||||||
</p>
|
</p>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (rci.versionMatch.currentCmp === 1) {
|
if (rci.versionMatch.currentCmp === 1) {
|
||||||
return (
|
return (
|
||||||
<p className="errorbox">
|
<p className="errorbox">
|
||||||
The chosen exchange might be outdated. The exchange has a lower, incompatible
|
The chosen exchange (protocol version <span>{rci.exchangeVersion}</span> might be outdated. The exchange has a lower, incompatible
|
||||||
protocol version.
|
protocol version than your wallet (protocol version <span>{rci.walletVersion}</span>).
|
||||||
</p>
|
</p>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user