mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-12-18 10:02:45 -05:00
fix: Issues with 1.1.0-rc (#328)
* bump(rust): Toolchain to 1.82 * bump(tauri): Bump some Tauri peer-dependencies * fix(gui): Prefer maker with known version, bump MIN_ASB_VERSION to 1.1.0-rc.3 * amend: CHANGELOG.md
This commit is contained in:
parent
0c4de7e4cd
commit
e66881d6eb
12 changed files with 411 additions and 538 deletions
|
|
@ -3,7 +3,8 @@ import { Multiaddr } from "multiaddr";
|
|||
import semver from "semver";
|
||||
import { isTestnet } from "store/config";
|
||||
|
||||
const MIN_ASB_VERSION = "1.0.0-alpha.1"
|
||||
// const MIN_ASB_VERSION = "1.0.0-alpha.1" // First version to support new libp2p protocol
|
||||
const MIN_ASB_VERSION = "1.1.0-rc.3" // First version with support for bdk > 1.0
|
||||
|
||||
export function providerToConcatenatedMultiAddr(provider: Maker) {
|
||||
return new Multiaddr(provider.multiAddr)
|
||||
|
|
@ -17,13 +18,19 @@ export function isMakerOnCorrectNetwork(
|
|||
return provider.testnet === isTestnet();
|
||||
}
|
||||
|
||||
export function isMakerOutdated(provider: ExtendedMakerStatus): boolean {
|
||||
if (provider.version != null) {
|
||||
if (semver.satisfies(provider.version, `>=${MIN_ASB_VERSION}`))
|
||||
return false;
|
||||
} else {
|
||||
return false;
|
||||
export function isMakerOutdated(maker: ExtendedMakerStatus): boolean {
|
||||
if (maker.version != null) {
|
||||
if (isMakerVersionOutdated(maker.version))
|
||||
return true;
|
||||
}
|
||||
|
||||
return true;
|
||||
// Do not mark a maker as outdated if it doesn't have a version
|
||||
return false;
|
||||
}
|
||||
|
||||
export function isMakerVersionOutdated(version: string): boolean {
|
||||
// This checks if the version is less than the minimum version
|
||||
// we use .compare(...) instead of .satisfies(...) because satisfies(...)
|
||||
// does not work with pre-release versions
|
||||
return semver.compare(version, MIN_ASB_VERSION) === -1;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue