-
Notifications
You must be signed in to change notification settings - Fork 188
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into CW-591-In-app-Cake-Pay-integration
- Loading branch information
Showing
210 changed files
with
7,921 additions
and
966 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
buildscript { | ||
ext.kotlin_version = '1.7.10' | ||
ext.kotlin_version = '1.8.21' | ||
repositories { | ||
google() | ||
jcenter() | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,4 +6,4 @@ | |
uri: workers.perish.co | ||
- | ||
uri: worker.nanoriver.cc | ||
useSSL: true | ||
useSSL: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
UI enhancements | ||
Bug fixes | ||
Generic bug fixes and enhancements |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1 @@ | ||
Add Replace-By-Fee to boost pending Bitcoin transactions | ||
Enable WalletConnect for Solana | ||
WalletConnect Enhancements | ||
Enhancements for ERC-20 tokens and Solana tokens | ||
Enhancements for Nano wallet | ||
UI enhancements | ||
Bug fixes | ||
Bitcoin Bug fixes and enhancements |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
- | ||
uri: api.trongrid.io | ||
is_default: true | ||
useSSL: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import 'dart:async'; | ||
|
||
import 'package:bitcoin_base/bitcoin_base.dart'; | ||
import 'package:bitcoin_flutter/bitcoin_flutter.dart'; | ||
import 'package:cw_bitcoin/utils.dart'; | ||
import 'package:cw_core/hardware/hardware_account_data.dart'; | ||
import 'package:ledger_bitcoin/ledger_bitcoin.dart'; | ||
import 'package:ledger_flutter/ledger_flutter.dart'; | ||
|
||
class BitcoinHardwareWalletService { | ||
BitcoinHardwareWalletService(this.ledger, this.device); | ||
|
||
final Ledger ledger; | ||
final LedgerDevice device; | ||
|
||
Future<List<HardwareAccountData>> getAvailableAccounts({int index = 0, int limit = 5}) async { | ||
final bitcoinLedgerApp = BitcoinLedgerApp(ledger); | ||
|
||
final masterFp = await bitcoinLedgerApp.getMasterFingerprint(device); | ||
print(masterFp); | ||
|
||
final accounts = <HardwareAccountData>[]; | ||
final indexRange = List.generate(limit, (i) => i + index); | ||
|
||
for (final i in indexRange) { | ||
final derivationPath = "m/84'/0'/$i'"; | ||
final xpub = await bitcoinLedgerApp.getXPubKey(device, derivationPath: derivationPath); | ||
HDWallet hd = HDWallet.fromBase58(xpub).derive(0); | ||
|
||
final address = generateP2WPKHAddress(hd: hd, index: 0, network: BitcoinNetwork.mainnet); | ||
|
||
accounts.add(HardwareAccountData( | ||
address: address, | ||
accountIndex: i, | ||
derivationPath: derivationPath, | ||
masterFingerprint: masterFp, | ||
xpub: xpub, | ||
)); | ||
} | ||
|
||
return accounts; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.