Skip to content

Commit efae9df

Browse files
author
Collin K. Cusce
committed
adding support for X alias
1 parent 18d5cac commit efae9df

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,17 +57,17 @@ export class Slopes extends SlopesCore {
5757
* @param port The port to reolve to reach the AVA Client RPC APIs
5858
* @param protocol The protocol string to use before a "://" in a request, ex: "http", "https", "git", "ws", etc ...
5959
* @param networkid Sets the NetworkID of the class. Default 2
60-
* @param avmChainID Sets the blockchainID for the AVM. Will try to auto-detect, otherwise default "HD8HEwNKTXRBcVUqvQW2LRu9izqej91xzGmXATF4KMMV6LLm7"
60+
* @param avmChainID Sets the blockchainID for the AVM. Will try to auto-detect, otherwise default "m383Jyn4z9kYmyMamjHwoExocRRV7ondsci862bbv1FSrqvH9"
6161
* @param skipinit Skips creating the APIs
6262
*/
6363
constructor(ip:string, port:number, protocol:string = "http", networkID:number = 2, avmChainID:string = undefined, skipinit:boolean = false) {
6464
super(ip, port, protocol);
6565
let chainid = avmChainID;
66-
if(typeof avmChainID === 'undefined' || !avmChainID || avmChainID.toLowerCase() == "avm"){
66+
if(typeof avmChainID === 'undefined' || !avmChainID || avmChainID.toLowerCase() == "avm" || avmChainID.toLowerCase() == "x"){
6767
if(networkID.toString() in Defaults.network){
68-
chainid = Defaults.network[networkID]["avm"].blockchainID
68+
chainid = Defaults.network[networkID]["X"].blockchainID
6969
} else {
70-
chainid = "HD8HEwNKTXRBcVUqvQW2LRu9izqej91xzGmXATF4KMMV6LLm7";
70+
chainid = "m383Jyn4z9kYmyMamjHwoExocRRV7ondsci862bbv1FSrqvH9";
7171
}
7272
}
7373
if(typeof networkID === 'number' && networkID >= 0){

0 commit comments

Comments
 (0)