Remove moonpay secret use exchange-helper instead (#1343)

* Remove moonpay secret use exchange-helper instead

* Update lib/buy/moonpay/moonpay_provider.dart

* remove web3dart dep from cw_solana

* Apply new api for moonpay exchange helper

* Add Robinhood as Polygon buy-provider
This commit is contained in:
Konstantin Ullrich 2024-03-25 13:16:57 -05:00 committed by GitHub
parent af7fe05099
commit bca59ad5e4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 44 additions and 35 deletions

View file

@ -1,6 +1,5 @@
import 'dart:async';
import 'dart:convert';
import 'dart:developer';
import 'dart:io';
import 'package:cw_core/cake_hive.dart';
import 'package:cw_core/crypto_currency.dart';
@ -30,7 +29,6 @@ import 'package:mobx/mobx.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:solana/metaplex.dart' as metaplex;
import 'package:solana/solana.dart';
import 'package:web3dart/crypto.dart';
part 'solana_wallet.g.dart';
@ -134,7 +132,7 @@ abstract class SolanaWalletBase
assert(mnemonic != null || privateKey != null);
if (privateKey != null) {
final privateKeyBytes = hexToBytes(privateKey);
final privateKeyBytes = HEX.decode(privateKey);
return await Wallet.fromPrivateKeyBytes(privateKey: privateKeyBytes);
}
@ -491,7 +489,7 @@ abstract class SolanaWalletBase
final signature = await _walletKeyPair!.sign(messageBytes);
// Convert the signature to a hexadecimal string
final hex = bytesToHex(signature.bytes);
final hex = HEX.encode(signature.bytes);
return hex;
}

View file

@ -19,7 +19,6 @@ dependencies:
bip39: ^1.0.6
mobx: ^2.3.0+1
shared_preferences: ^2.0.15
web3dart: ^2.7.1
bip32: ^2.0.0
hex: ^0.2.0
@ -34,4 +33,4 @@ dev_dependencies:
flutter:
# assets:
# - images/a_dot_burr.jpeg
# - images/a_dot_ham.jpeg
# - images/a_dot_ham.jpeg