5
5
using BTCPayServer . Abstractions . Contracts ;
6
6
using BTCPayServer . Client ;
7
7
using BTCPayServer . Filters ;
8
- using BTCPayServer . Plugins . TronUSDt . Configuration ;
9
- using BTCPayServer . Plugins . TronUSDt . Controllers . ViewModels ;
10
- using BTCPayServer . Plugins . TronUSDt . Services ;
11
- using BTCPayServer . Plugins . TronUSDt . Services . Events ;
8
+ using BTCPayServer . Plugins . USDt . Configuration ;
9
+ using BTCPayServer . Plugins . USDt . Controllers . ViewModels ;
10
+ using BTCPayServer . Plugins . USDt . Services ;
11
+ using BTCPayServer . Plugins . USDt . Services . Events ;
12
12
using Microsoft . AspNetCore . Authorization ;
13
13
using Microsoft . AspNetCore . Mvc ;
14
14
using Microsoft . Extensions . Configuration ;
15
15
16
- namespace BTCPayServer . Plugins . TronUSDt . Controllers ;
16
+ namespace BTCPayServer . Plugins . USDt . Controllers ;
17
17
18
18
[ Route ( "server/tronUSDtlike" ) ]
19
19
[ OnlyIfSupport ( "TronUSDt" ) ]
@@ -33,12 +33,12 @@ public async Task<IActionResult> GetServerConfig()
33
33
if ( network is null ) return NotFound ( ) ;
34
34
35
35
var serverSettings = await settingsRepository . GetSettingAsync < TronUSDtLikeServerSettings > (
36
- TronUSDtPlugin . ServerSettingsKey ( network . CryptoCode ) ) ;
36
+ USDtPlugin . ServerSettingsKey ( network . CryptoCode ) ) ;
37
37
38
38
var viewModel = new TronUSDtLikeServerConfigViewModel ( )
39
39
{
40
- DefaultSmartContractAddress = TronUSDtPlugin . GetDefaultSmartContractAddress ( btcPayNetworkProvider . NetworkType , configuration , network ) ,
41
- DefaultJsonRpcUri = TronUSDtPlugin . GetDefaultJsonRpcUri ( btcPayNetworkProvider . NetworkType , configuration , network ) ,
40
+ DefaultSmartContractAddress = USDtPlugin . GetDefaultSmartContractAddress ( btcPayNetworkProvider . NetworkType , configuration , network ) ,
41
+ DefaultJsonRpcUri = USDtPlugin . GetDefaultJsonRpcUri ( btcPayNetworkProvider . NetworkType , configuration , network ) ,
42
42
43
43
SmartContractAddress = serverSettings ? . SmartContractAddress ,
44
44
JsonRpcUri = serverSettings ? . JsonRpcUri ? . AbsoluteUri ,
@@ -56,8 +56,8 @@ public async Task<IActionResult> GetServerConfig(TronUSDtLikeServerConfigViewMod
56
56
57
57
if ( ! ModelState . IsValid )
58
58
{
59
- viewModel . DefaultSmartContractAddress = TronUSDtPlugin . GetDefaultSmartContractAddress ( btcPayNetworkProvider . NetworkType , configuration , network ) ;
60
- viewModel . DefaultJsonRpcUri = TronUSDtPlugin . GetDefaultJsonRpcUri ( btcPayNetworkProvider . NetworkType , configuration , network ) ;
59
+ viewModel . DefaultSmartContractAddress = USDtPlugin . GetDefaultSmartContractAddress ( btcPayNetworkProvider . NetworkType , configuration , network ) ;
60
+ viewModel . DefaultJsonRpcUri = USDtPlugin . GetDefaultJsonRpcUri ( btcPayNetworkProvider . NetworkType , configuration , network ) ;
61
61
return View ( viewModel ) ;
62
62
}
63
63
@@ -67,10 +67,10 @@ public async Task<IActionResult> GetServerConfig(TronUSDtLikeServerConfigViewMod
67
67
JsonRpcUri = viewModel . JsonRpcUri is null or "" ? null : new Uri ( viewModel . JsonRpcUri )
68
68
} ;
69
69
70
- await settingsRepository . UpdateSetting ( serverSettings , TronUSDtPlugin . ServerSettingsKey ( network . CryptoCode ) ) ;
70
+ await settingsRepository . UpdateSetting ( serverSettings , USDtPlugin . ServerSettingsKey ( network . CryptoCode ) ) ;
71
71
72
72
tronUSDtLikeConfiguration . TronUSDtLikeConfigurationItems [ network . CryptoCode ] =
73
- TronUSDtPlugin . GetConfigurationItem ( btcPayNetworkProvider . NetworkType , serverSettings , configuration , network ) ;
73
+ USDtPlugin . GetConfigurationItem ( btcPayNetworkProvider . NetworkType , serverSettings , configuration , network ) ;
74
74
75
75
76
76
eventAggregator . Publish ( new TronUSDtSettingsChanged ( ) ) ;
0 commit comments