Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ extension WalletStore {
let walletP3A,
let bitcoinWalletService = BraveWallet.BitcoinWalletServiceFactory.get(
privateMode: privateMode
),
let zcashWalletService = BraveWallet.ZCashWalletServiceFactory.get(
privateMode: privateMode
)
else {
Logger.module.error("Failed to load wallet. One or more services were unavailable")
Expand All @@ -51,7 +54,8 @@ extension WalletStore {
solTxManagerProxy: solTxManagerProxy,
ipfsApi: ipfsApi,
walletP3A: walletP3A,
bitcoinWalletService: bitcoinWalletService
bitcoinWalletService: bitcoinWalletService,
zcashWalletService: zcashWalletService
)
}
}
Expand All @@ -75,6 +79,9 @@ extension CryptoStore {
let walletP3A,
let bitcoinWalletService = BraveWallet.BitcoinWalletServiceFactory.get(
privateMode: privateMode
),
let zcashWalletService = BraveWallet.ZCashWalletServiceFactory.get(
privateMode: privateMode
)
else {
Logger.module.error("Failed to load wallet. One or more services were unavailable")
Expand All @@ -92,7 +99,8 @@ extension CryptoStore {
solTxManagerProxy: solTxManagerProxy,
ipfsApi: ipfsApi,
walletP3A: walletP3A,
bitcoinWalletService: bitcoinWalletService
bitcoinWalletService: bitcoinWalletService,
zcashWalletService: zcashWalletService
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,15 @@ import SwiftUI
struct BraveWalletDebugMenu: View {

@ObservedObject var enableBitcoinTestnet = Preferences.Wallet.isBitcoinTestnetEnabled
@ObservedObject var enableZcashTestnet = Preferences.Wallet.isZcashTestnetEnabled

var body: some View {
Form {
Section {
Toggle("Enable Bitcoin Testnet", isOn: $enableBitcoinTestnet.value)
.toggleStyle(SwitchToggleStyle(tint: .accentColor))
Toggle("Enable Zcash Testnet", isOn: $enableZcashTestnet.value)
.toggleStyle(SwitchToggleStyle(tint: .accentColor))
}
}
.listBackgroundColor(Color(UIColor.braveGroupedBackground))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,8 @@
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"preserves-vector-representation" : true
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"scale" : "1x"
},
{
"filename" : "avax.png",
"filename" : "avax-asset-icon.svg",
"idiom" : "universal",
"scale" : "2x"
},
Expand All @@ -17,5 +17,8 @@
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"preserves-vector-representation" : true
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "base.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"scale" : "1x"
},
{
"filename" : "btc-asset-icon [email protected]",
"filename" : "btc-asset-icon.svg",
"idiom" : "universal",
"scale" : "2x"
},
Expand All @@ -17,5 +17,8 @@
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"preserves-vector-representation" : true
}
}
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"scale" : "1x"
},
{
"filename" : "eth-asset-icon.png",
"filename" : "eth-asset-icon.svg",
"idiom" : "universal",
"scale" : "2x"
},
Expand All @@ -17,5 +17,8 @@
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"preserves-vector-representation" : true
}
}
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"scale" : "1x"
},
{
"filename" : "filecoin-asset-icon.png",
"filename" : "filecoin-asset-icon.svg",
"idiom" : "universal",
"scale" : "2x"
},
Expand All @@ -17,5 +17,8 @@
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"preserves-vector-representation" : true
}
}
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"scale" : "1x"
},
{
"filename" : "matic-asset-icon.png",
"filename" : "matic-asset-icon.svg",
"idiom" : "universal",
"scale" : "2x"
},
Expand All @@ -17,5 +17,8 @@
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"preserves-vector-representation" : true
}
}
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "neon-color.svg",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"preserves-vector-representation" : true
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"images" : [
{
"filename" : "sol-asset-icon.pdf",
"filename" : "sol-asset-icon.svg",
"idiom" : "universal"
}
],
Expand Down
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "zec-asset-icon.svg",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"preserves-vector-representation" : true
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ private struct AccountCardView: View {
Label(Strings.Wallet.editButtonTitle, braveSystemImage: "leo.edit.pencil")
}
Divider()
if account.coin != .btc {
if account.supportsAccountExport {
Button {
action(.exportAccount)
} label: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ struct AccountActivityView: View {
} label: {
Label(Strings.Wallet.editButtonTitle, braveSystemImage: "leo.edit.pencil")
}
if store.account.coin != .btc {
if store.account.supportsAccountExport {
Button {
isPresentingExportAccount = true
} label: {
Expand Down Expand Up @@ -190,7 +190,7 @@ struct AccountActivityView: View {
)
}
)
if store.account.coin != .fil && store.account.coin != .btc {
if store.account.supportsNFT {
Divider()
NavigationLink(
destination: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,9 @@ struct AddAccountView: View {
if isJSONImported {
originPasswordSection
}
privateKeySection
if selectedCoin != .zec && preSelectedCoin != .zec {
privateKeySection
}
}
.listStyle(.insetGrouped)
.scrollContentBackground(.hidden)
Expand Down Expand Up @@ -277,7 +279,7 @@ struct AddAccountView: View {
}
}
.onChange(of: selectedCoin) { coin in
if coin == .fil || coin == .btc {
if coin == .fil || coin == .btc || coin == .zec {
accountNetwork = selectedCoinNetworks.first(where: { $0.coin == coin }) ?? .init()
}
}
Expand Down Expand Up @@ -427,6 +429,10 @@ struct AddAccountView: View {
&& Preferences.Wallet.isBitcoinTestnetEnabled.value
{
return true
} else if (selectedCoin == .zec || preSelectedCoin == .zec)
&& Preferences.Wallet.isZcashTestnetEnabled.value
{
return true
}
return false
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ struct AccountDetailsView: View {
)
}
)
if account.coin != .btc {
if account.supportsAccountExport {
Section {
NavigationLink(
destination: AccountPrivateKeyView(keyringStore: keyringStore, account: account)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,7 @@ struct SelectAccountTokenView: View {
WalletListHeaderView {
CopyAddressHeader(
displayText: accountSection.account.accountNameDisplay,
account: accountSection.account,
btcAccountInfo: accountSection.bitcoinAccountInfo
address: accountSection.copyAddress
)
}
}
Expand Down
Loading
Loading