mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-20 17:54:41 +00:00
Merge branch 'main' into ui-enhancements
This commit is contained in:
commit
3352802a4f
4 changed files with 50 additions and 14 deletions
|
@ -1,5 +1,7 @@
|
||||||
-
|
-
|
||||||
uri: ethereum.publicnode.com
|
uri: ethereum-rpc.publicnode.com
|
||||||
|
useSSL: true
|
||||||
|
isDefault: true
|
||||||
-
|
-
|
||||||
uri: eth.llamarpc.com
|
uri: eth.llamarpc.com
|
||||||
-
|
-
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
-
|
-
|
||||||
uri: polygon-rpc.com
|
uri: polygon-rpc.com
|
||||||
-
|
-
|
||||||
uri: polygon-bor.publicnode.com
|
uri: polygon-bor-rpc.publicnode.com
|
||||||
|
useSSL: true
|
||||||
|
isDefault: true
|
||||||
-
|
-
|
||||||
uri: polygon.llamarpc.com
|
uri: polygon.llamarpc.com
|
||||||
-
|
-
|
||||||
|
|
|
@ -379,16 +379,18 @@ class SolanaWalletClient {
|
||||||
required double solBalance,
|
required double solBalance,
|
||||||
required double fee,
|
required double fee,
|
||||||
}) async {
|
}) async {
|
||||||
final rent =
|
return true;
|
||||||
await _client!.getMinimumBalanceForMintRentExemption(commitment: Commitment.confirmed);
|
// TODO: this is not doing what the name inclines
|
||||||
|
// final rent =
|
||||||
final rentInSol = (rent / lamportsPerSol).toDouble();
|
// await _client!.getMinimumBalanceForMintRentExemption(commitment: Commitment.confirmed);
|
||||||
|
//
|
||||||
final remnant = solBalance - (inputAmount + fee);
|
// final rentInSol = (rent / lamportsPerSol).toDouble();
|
||||||
|
//
|
||||||
if (remnant > rentInSol) return true;
|
// final remnant = solBalance - (inputAmount + fee);
|
||||||
|
//
|
||||||
return false;
|
// if (remnant > rentInSol) return true;
|
||||||
|
//
|
||||||
|
// return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<PendingSolanaTransaction> _signNativeTokenTransaction({
|
Future<PendingSolanaTransaction> _signNativeTokenTransaction({
|
||||||
|
|
|
@ -35,8 +35,8 @@ const publicBitcoinTestnetElectrumUri =
|
||||||
'$publicBitcoinTestnetElectrumAddress:$publicBitcoinTestnetElectrumPort';
|
'$publicBitcoinTestnetElectrumAddress:$publicBitcoinTestnetElectrumPort';
|
||||||
const cakeWalletLitecoinElectrumUri = 'ltc-electrum.cakewallet.com:50002';
|
const cakeWalletLitecoinElectrumUri = 'ltc-electrum.cakewallet.com:50002';
|
||||||
const havenDefaultNodeUri = 'nodes.havenprotocol.org:443';
|
const havenDefaultNodeUri = 'nodes.havenprotocol.org:443';
|
||||||
const ethereumDefaultNodeUri = 'ethereum.publicnode.com';
|
const ethereumDefaultNodeUri = 'ethereum-rpc.publicnode.com';
|
||||||
const polygonDefaultNodeUri = 'polygon-bor.publicnode.com';
|
const polygonDefaultNodeUri = 'polygon-bor-rpc.publicnode.com';
|
||||||
const cakeWalletBitcoinCashDefaultNodeUri = 'bitcoincash.stackwallet.com:50002';
|
const cakeWalletBitcoinCashDefaultNodeUri = 'bitcoincash.stackwallet.com:50002';
|
||||||
const nanoDefaultNodeUri = 'nano.nownodes.io';
|
const nanoDefaultNodeUri = 'nano.nownodes.io';
|
||||||
const nanoDefaultPowNodeUri = 'rpc.nano.to';
|
const nanoDefaultPowNodeUri = 'rpc.nano.to';
|
||||||
|
@ -360,6 +360,18 @@ Future<void> defaultSettingsMigration(
|
||||||
'solana-rpc.publicnode.com:443',
|
'solana-rpc.publicnode.com:443',
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
_updateNode(
|
||||||
|
nodes: nodes,
|
||||||
|
currentUri: "ethereum.publicnode.com",
|
||||||
|
newUri: "ethereum-rpc.publicnode.com",
|
||||||
|
useSSL: true,
|
||||||
|
);
|
||||||
|
_updateNode(
|
||||||
|
nodes: nodes,
|
||||||
|
currentUri: "polygon-bor.publicnode.com",
|
||||||
|
newUri: "polygon-bor-rpc.publicnode.com",
|
||||||
|
useSSL: true,
|
||||||
|
);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
@ -375,6 +387,24 @@ Future<void> defaultSettingsMigration(
|
||||||
await sharedPreferences.setInt(PreferencesKey.currentDefaultSettingsMigrationVersion, version);
|
await sharedPreferences.setInt(PreferencesKey.currentDefaultSettingsMigrationVersion, version);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void _updateNode({
|
||||||
|
required Box<Node> nodes,
|
||||||
|
required String currentUri,
|
||||||
|
String? newUri,
|
||||||
|
bool? useSSL,
|
||||||
|
}) {
|
||||||
|
for (Node node in nodes.values) {
|
||||||
|
if (node.uriRaw == currentUri) {
|
||||||
|
if (newUri != null) {
|
||||||
|
node.uriRaw = newUri;
|
||||||
|
}
|
||||||
|
if (useSSL != null) {
|
||||||
|
node.useSSL = useSSL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Future<void> _backupHavenSeeds(Box<HavenSeedStore> havenSeedStore) async {
|
Future<void> _backupHavenSeeds(Box<HavenSeedStore> havenSeedStore) async {
|
||||||
final future = haven?.backupHavenSeeds(havenSeedStore);
|
final future = haven?.backupHavenSeeds(havenSeedStore);
|
||||||
if (future != null) {
|
if (future != null) {
|
||||||
|
|
Loading…
Reference in a new issue