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:
Adegoke David 2024-06-28 22:36:12 +01:00 committed by GitHub
parent ac9e473ef5
commit a319e10156
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 51 additions and 8 deletions

View file

@ -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);