mirror of
https://github.com/fluencelabs/fluence-js.git
synced 2025-03-15 07:20:49 +00:00
Remove BC
This commit is contained in:
parent
dbd4d9c1fc
commit
29c18d48ba
@ -164,3 +164,27 @@ export const kras: Relay[] = [
|
|||||||
peerId: "12D3KooWD7CvsYcpF9HE9CCV9aY3SJ317tkXVykjtZnht2EbzDPm",
|
peerId: "12D3KooWD7CvsYcpF9HE9CCV9aY3SJ317tkXVykjtZnht2EbzDPm",
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
// for backward compatibility
|
||||||
|
export const krasnodar = kras;
|
||||||
|
|
||||||
|
export const randomKras = () => {
|
||||||
|
return randomItem(kras);
|
||||||
|
};
|
||||||
|
|
||||||
|
export const randomTestNet = () => {
|
||||||
|
return randomItem(testNet);
|
||||||
|
};
|
||||||
|
|
||||||
|
export const randomStage = () => {
|
||||||
|
return randomItem(stage);
|
||||||
|
};
|
||||||
|
|
||||||
|
function randomItem(arr: Relay[]) {
|
||||||
|
const index = randomInt(0, arr.length);
|
||||||
|
return arr[index];
|
||||||
|
}
|
||||||
|
|
||||||
|
function randomInt(min: number, max: number) {
|
||||||
|
return Math.floor(Math.random() * (max - min)) + min;
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user