mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-06-28 12:29:51 +00:00
CW-653-Migrate-Tron-And-Solana-To-NowNodes (#1492)
* chore: Setup * feat: Add NowNodes for Tron Wallet and switch it to be the default node for Tron * feat: Add NowNodes for Solana Wallet and switch it to be the default node for Solana * fix: Add nownodes entry to secrets * fix: Remove pubspec.lock in shared external * fix conflicts with main * change secrets names * feat: Remove Solana NowNodes config * feat: Remove Solana NowNodes config * feat: Revert commented out code --------- Co-authored-by: OmarHatem <omarh.ismail1@gmail.com>
This commit is contained in:
parent
ac9e473ef5
commit
a319e10156
9 changed files with 51 additions and 8 deletions
|
@ -20,6 +20,7 @@ class TronHTTPProvider implements TronServiceProvider {
|
|||
final response = await client.get(Uri.parse(params.url(url)), headers: {
|
||||
'Content-Type': 'application/json',
|
||||
if (url.contains("trongrid")) 'TRON-PRO-API-KEY': secrets.tronGridApiKey,
|
||||
if (url.contains("nownodes")) 'api-key': secrets.tronNowNodesApiKey,
|
||||
}).timeout(timeout ?? defaultRequestTimeout);
|
||||
final data = json.decode(response.body) as Map<String, dynamic>;
|
||||
return data;
|
||||
|
@ -32,6 +33,7 @@ class TronHTTPProvider implements TronServiceProvider {
|
|||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
if (url.contains("trongrid")) 'TRON-PRO-API-KEY': secrets.tronGridApiKey,
|
||||
if (url.contains("nownodes")) 'api-key': secrets.tronNowNodesApiKey,
|
||||
},
|
||||
body: params.toRequestBody())
|
||||
.timeout(timeout ?? defaultRequestTimeout);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue