Skip to content

Commit

Permalink
Merge branch 'main' into main_android
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkbee1 committed Nov 7, 2023
2 parents e7c548b + 84d7eaa commit 14f7684
Show file tree
Hide file tree
Showing 20 changed files with 429 additions and 213 deletions.
1 change: 0 additions & 1 deletion android/app/src/debug/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.USE_FINGERPRINT"/>
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />
</manifest>
1 change: 0 additions & 1 deletion android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.USE_FINGERPRINT"/>
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />
<queries>
<!-- If your app opens https URLs -->
<intent>
Expand Down
4 changes: 4 additions & 0 deletions lib/app/shared/constants/parameters.dart
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,8 @@ class Parameters {
];

static const walletConnectEvents = ['chainChanged', 'accountsChanged'];

static const String clientId = 'urn:altme:0001';
static const String clientSecret =
'urn:uuid:f2e1b84a-930b-4250-a6c6-f35cabf698c8';
}
2 changes: 1 addition & 1 deletion lib/app/shared/constants/secure_storage_keys.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ class SecureStorageKeys {
'enableCryptographicHolderBinding';
static const String enableScopeParameter = 'enableScopeParameter';
static const String isPreRegisteredWallet = 'isPreRegisteredWallet';
static const String clientSecret = 'clientSecret';
static const String clientId = 'clientId';
static const String clientSecret = 'clientSecret';

static const String pinCode = 'pinCode';
static const String data = 'data';
Expand Down
9 changes: 8 additions & 1 deletion lib/app/shared/constants/urls.dart
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,14 @@ class Urls {
static const String talaoIpfsGateway = 'https://talao.mypinata.cloud/ipfs/';

/// main tezos rpc
static const mainnetRPC = 'https://rpc.tzstats.com';
static const mainnetRPC = [
'https://mainnet.ecadinfra.com',
'https://mainnet.api.tez.ie',
'https://rpc.tzbeta.net',
'https://mainnet.tezos.marigold.dev',
'https://rpc.tzstats.com',
];

static const ghostnetRPC = 'https://rpc.tzkt.io/ghostnet';

static const coinGeckoBase = 'https://pro-api.coingecko.com/api/v3/';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class BlockchainNetwork extends Equatable {
final String networkname;
final String apiUrl;
final String apiKey;
final String rpcNodeUrl;
final dynamic rpcNodeUrl;
final String? title;
final String? subTitle;
final BlockchainType type;
Expand Down
13 changes: 8 additions & 5 deletions lib/dashboard/connection/operation/cubit/operation_cubit.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import 'dart:async';
import 'dart:convert';
import 'dart:math';

import 'package:altme/app/app.dart';
import 'package:altme/connection_bridge/connection_bridge.dart';
Expand Down Expand Up @@ -353,11 +354,11 @@ class OperationCubit extends Cubit<OperationState> {
case BlockchainType.ethereum:
rpcUrl = await web3RpcMainnetInfuraURL();
case BlockchainType.fantom:
rpcUrl = FantomNetwork.mainNet().rpcNodeUrl;
rpcUrl = FantomNetwork.mainNet().rpcNodeUrl as String;
case BlockchainType.polygon:
rpcUrl = PolygonNetwork.mainNet().rpcNodeUrl;
rpcUrl = PolygonNetwork.mainNet().rpcNodeUrl as String;
case BlockchainType.binance:
rpcUrl = BinanceNetwork.mainNet().rpcNodeUrl;
rpcUrl = BinanceNetwork.mainNet().rpcNodeUrl as String;
}

log.i('rpcUrl - $rpcUrl');
Expand Down Expand Up @@ -481,10 +482,12 @@ class OperationCubit extends Cubit<OperationState> {
switch (beaconRequest.request!.network!.type!) {
case NetworkType.mainnet:
baseUrl = TezosNetwork.mainNet().apiUrl;
rpcNodeUrl = TezosNetwork.mainNet().rpcNodeUrl;
final rpcNodeUrlList =
TezosNetwork.mainNet().rpcNodeUrl as List<String>;
rpcNodeUrl = rpcNodeUrlList[Random().nextInt(rpcNodeUrlList.length)];
case NetworkType.ghostnet:
baseUrl = TezosNetwork.ghostnet().apiUrl;
rpcNodeUrl = TezosNetwork.ghostnet().rpcNodeUrl;
rpcNodeUrl = TezosNetwork.ghostnet().rpcNodeUrl as String;
case NetworkType.mondaynet:
case NetworkType.delphinet:
case NetworkType.edonet:
Expand Down
Loading

0 comments on commit 14f7684

Please sign in to comment.