File tree Expand file tree Collapse file tree 4 files changed +23
-12
lines changed
Expand file tree Collapse file tree 4 files changed +23
-12
lines changed Original file line number Diff line number Diff line change @@ -221,9 +221,6 @@ public static async Task<List<Token>> GetNetworkTokens(int networkId)
221221
222222 var tokens = new List < Token > ( ) ;
223223
224-
225-
226-
227224 var getNetworkData = MauiProgram . NetworkSettings . FirstOrDefault ( x => x . Id == networkId && x . IsProduction == MauiProgram . IsDevelopment ) ;
228225
229226 if ( getNetworkData != null )
@@ -246,9 +243,6 @@ public static async Task<List<Token>> GetNetworkTokens(int networkId)
246243 } ) ;
247244 }
248245
249-
250-
251-
252246 tokens = await GetListedTokens ( listedTokenData , tokens , getNetworkData ) ;
253247
254248 if ( ! File . Exists ( $ "{ MauiProgram . DefaultPath } /LocalTokens.json") )
Original file line number Diff line number Diff line change 1414using System . Security . Cryptography ;
1515using SYNCWallet . Models ;
1616using SYNCWallet . Services . Implementation ;
17+ using System . Net ;
1718
1819namespace NFTLock . Data
1920{
@@ -40,16 +41,31 @@ public string DeviceConnected()
4041 return current ;
4142 }
4243
43- public void CreateNewDevice ( string port )
44+ public async void CreateNewDevice ( string port )
4445 {
4546 string [ ] hexFileContents ;
46-
47+ string userName = Environment . UserName ;
48+
4749 try
48- {
50+ {
51+ if ( ! File . Exists ( @$ "C:\Users\{ userName } \Downloads\wallet.ino.standard.hex") )
52+ {
53+ using ( WebClient wc = new WebClient ( ) )
54+ {
55+
56+ wc . DownloadFile (
57+ // Param1 = Link of file
58+ new System . Uri ( "https://raw.githubusercontent.com/KristiforMilchev/LInksync-Cold-Storage-Wallet/main/HardwareCode/ColdStorage/wallet.ino.standard.hex" ) ,
59+ // Param2 = Path to save
60+ @$ "C:\Users\{ userName } \Downloads\wallet.ino.standard.hex"
61+ ) ;
62+ }
63+ }
64+
4965 var uploader = new ArduinoSketchUploader (
5066 new ArduinoSketchUploaderOptions ( )
5167 {
52- FileName = @$ "{ MauiProgram . DefaultPath } \HardwareCode\ColdStorage \wallet.ino.standard.hex",
68+ FileName = @$ "C:\Users\ { userName } \Downloads \wallet.ino.standard.hex",
5369 PortName = port ,
5470 ArduinoModel = ArduinoModel . UnoR3
5571 } ) ;
@@ -59,6 +75,7 @@ public void CreateNewDevice(string port)
5975 catch ( Exception e )
6076 {
6177 Debug . WriteLine ( e . ToString ( ) ) ;
78+
6279 }
6380 }
6481
Original file line number Diff line number Diff line change 7474 </div >
7575 </div >
7676 <!-- Row -->
77- <div class =" row" >
77+ <div class =" row" style = " display : none ; " >
7878 <div class =" col-12" >
7979 <div class =" card" >
8080 <div class =" row" >
Original file line number Diff line number Diff line change 1616 <ApplicationTitle >SYNCWallet</ApplicationTitle >
1717 <!-- App Identifier -->
1818 <ApplicationId >Collaborativesoft</ApplicationId >
19- <ApplicationIdGuid >15E612FC-7344-4F59-B4E9-6E53C73CB66A </ApplicationIdGuid >
19+ <ApplicationIdGuid >1138A4C6-A499-4A14-B8CC-1C9AE4A9EDA1 </ApplicationIdGuid >
2020
2121
2222
You can’t perform that action at this time.
0 commit comments