This repository was archived by the owner on Mar 11, 2025. It is now read-only.
File tree 2 files changed +6
-3
lines changed
2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ import {
37
37
estimateEvmTransactionsGasCost ,
38
38
estimateSubstrateGas
39
39
} from '../../utils/gas' ;
40
+ import type { FungibleTokenTransfer } from '../../components' ;
40
41
import { buildEvmFungibleTransactions , executeNextEvmTransaction } from './evm' ;
41
42
import {
42
43
buildSubstrateFungibleTransactions ,
@@ -95,7 +96,7 @@ export class FungibleTokenTransferController implements ReactiveController {
95
96
protected executeSubstrateTransaction = executeNextSubstrateTransaction ;
96
97
97
98
protected config : Config ;
98
- protected env : Environment = Environment . MAINNET ;
99
+ protected env : Environment ;
99
100
//source network chain id -> Route[]
100
101
protected routesCache : Map < number , Route [ ] > = new Map ( ) ;
101
102
@@ -146,6 +147,8 @@ export class FungibleTokenTransferController implements ReactiveController {
146
147
constructor ( host : ReactiveElement ) {
147
148
( this . host = host ) . addController ( this ) ;
148
149
this . config = new Config ( ) ;
150
+ this . env =
151
+ ( this . host as FungibleTokenTransfer ) . environment ?? Environment . MAINNET ;
149
152
150
153
this . walletContext = new ContextConsumer ( host , {
151
154
context : walletContext ,
Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ class SygmaProtocolWidget
84
84
85
85
connectedCallback ( ) : void {
86
86
super . connectedCallback ( ) ;
87
- const env = import . meta . env . VITE_BRIDGE_ENV ?? Environment . MAINNET ;
87
+ const env = this . environment ?? Environment . MAINNET ;
88
88
if ( Object . values ( Environment ) . includes ( env as Environment ) ) {
89
89
this . environment = env as Environment ;
90
90
} else {
@@ -120,7 +120,7 @@ class SygmaProtocolWidget
120
120
.environment =${ this . environment as Environment }
121
121
.onSourceNetworkSelected=${ ( domain : Domain ) =>
122
122
( this . sourceNetwork = domain ) }
123
- environment=${ Environment . TESTNET }
123
+ environment=${ this . environment ?? Environment . MAINNET }
124
124
.whitelistedSourceNetworks=${ this . whitelistedSourceNetworks }
125
125
.whitelistedDestinationNetworks=${ this
126
126
. whitelistedDestinationNetworks }
You can’t perform that action at this time.
0 commit comments