mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-16 17:27:39 +00:00
Merge branch 'solana' into tor
This commit is contained in:
commit
d17a66b2fc
2 changed files with 10 additions and 5 deletions
|
@ -1,9 +1,9 @@
|
|||
import 'package:solana/solana.dart';
|
||||
import 'package:stackwallet/models/node_model.dart';
|
||||
import 'package:stackwallet/utilities/default_nodes.dart';
|
||||
import 'package:stackwallet/utilities/enums/coin_enum.dart';
|
||||
import 'package:stackwallet/wallets/crypto_currency/crypto_currency.dart';
|
||||
import 'package:stackwallet/wallets/crypto_currency/intermediate/bip39_currency.dart';
|
||||
import 'package:stackwallet/utilities/default_nodes.dart';
|
||||
|
||||
class Solana extends Bip39Currency {
|
||||
Solana(super.network) {
|
||||
|
@ -20,7 +20,8 @@ class Solana extends Bip39Currency {
|
|||
switch (network) {
|
||||
case CryptoCurrencyNetwork.main:
|
||||
return NodeModel(
|
||||
host: "https://api.mainnet-beta.solana.com/", // TODO: Change this to stack wallet one
|
||||
host:
|
||||
"https://api.mainnet-beta.solana.com/", // TODO: Change this to stack wallet one
|
||||
port: 443,
|
||||
name: DefaultNodes.defaultName,
|
||||
id: DefaultNodes.buildId(Coin.solana),
|
||||
|
@ -38,11 +39,15 @@ class Solana extends Bip39Currency {
|
|||
@override
|
||||
int get minConfirms => 21;
|
||||
|
||||
@override
|
||||
bool get torSupport => true;
|
||||
|
||||
@override
|
||||
bool validateAddress(String address) {
|
||||
return isPointOnEd25519Curve(Ed25519HDPublicKey.fromBase58(address).toByteArray());
|
||||
return isPointOnEd25519Curve(
|
||||
Ed25519HDPublicKey.fromBase58(address).toByteArray());
|
||||
}
|
||||
|
||||
@override
|
||||
String get genesisHash => throw UnimplementedError();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -179,7 +179,7 @@ dependencies:
|
|||
solana:
|
||||
git: # TODO [prio=low]: Revert to official package once Tor support is merged upstream.
|
||||
url: https://github.com/cypherstack/espresso-cash-public.git
|
||||
ref: 0ada1f775c2a2c815de640424270a229f5e91e2f
|
||||
ref: a83e375678eb22fe544dc125d29bbec0fb833882
|
||||
path: packages/solana
|
||||
|
||||
dev_dependencies:
|
||||
|
|
Loading…
Reference in a new issue