File tree 2 files changed +9
-6
lines changed
packages/plugin-near/src/providers
2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -191,4 +191,7 @@ NEAR_WALLET_SECRET_KEY=
191
191
NEAR_WALLET_PUBLIC_KEY =
192
192
NEAR_ADDRESS =
193
193
SLIPPAGE = 1
194
- RPC_URL =
194
+ RPC_URL =
195
+
196
+ # Add this line to your existing .env.example
197
+ NEAR_NETWORK = testnet # or mainnet
Original file line number Diff line number Diff line change @@ -7,11 +7,11 @@ import os from "os";
7
7
import { KeyPairString } from "near-api-js/lib/utils" ;
8
8
9
9
const PROVIDER_CONFIG = {
10
- networkId : "testnet" ,
11
- nodeUrl : process . env . RPC_URL || " https://rpc.testnet.near.org" ,
12
- walletUrl : " https://testnet.mynearwallet.com/" ,
13
- helperUrl : " https://helper.testnet.near.org" ,
14
- explorerUrl : " https://testnet.nearblocks.io" ,
10
+ networkId : process . env . NEAR_NETWORK || "testnet" ,
11
+ nodeUrl : process . env . RPC_URL || ` https://rpc.${ process . env . NEAR_NETWORK || " testnet" } .near.org` ,
12
+ walletUrl : ` https://${ process . env . NEAR_NETWORK || " testnet" } .mynearwallet.com/` ,
13
+ helperUrl : ` https://helper.${ process . env . NEAR_NETWORK || " testnet" } .near.org` ,
14
+ explorerUrl : ` https://${ process . env . NEAR_NETWORK || " testnet" } .nearblocks.io` ,
15
15
MAX_RETRIES : 3 ,
16
16
RETRY_DELAY : 2000 ,
17
17
SLIPPAGE : process . env . SLIPPAGE ? parseInt ( process . env . SLIPPAGE ) : 1 ,
You can’t perform that action at this time.
0 commit comments