fix(@desktop/wallet): [base_bc] can't copy wallet address

Store propagation in order to use the global copyToClipboard method.

It is also applied in WalletV2.

Fixes #4636
This commit is contained in:
Noelia 2022-01-31 14:29:27 +01:00 committed by Sale Djenic
parent f3485446c3
commit 9673c399e5
7 changed files with 13 additions and 0 deletions

View File

@ -16,6 +16,7 @@ Item {
id: walletView
property bool hideSignPhraseModal: false
property var store
function showSigningPhrasePopup(){
if(!hideSignPhraseModal && !RootStore.hideSignPhraseModal){
@ -74,6 +75,7 @@ Item {
id: walletContainer
anchors.fill: parent
changeSelectedAccount: leftTab.changeSelectedAccount
store: walletView.store
}
}
}

View File

@ -19,6 +19,7 @@ Item {
property string currency: ""
property var currentAccount
property var changeSelectedAccount
property var store
height: walletAddress.y + walletAddress.height
anchors.right: parent.right
@ -72,6 +73,7 @@ Item {
addressWidth: 180
anchors.leftMargin: 0
anchors.topMargin: 0
store: walletHeader.store
}
Component {

View File

@ -18,6 +18,7 @@ Item {
property var changeSelectedAccount
property alias currentTabIndex: walletTabBar.currentIndex
property var store
WalletHeader {
id: walletHeader
@ -25,6 +26,7 @@ Item {
currency: RootStore.currentCurrency
currentAccount: RootStore.currentAccount
changeSelectedAccount: walletContainer.changeSelectedAccount
store: walletContainer.store
}
RowLayout {

View File

@ -97,6 +97,7 @@ Item {
id: walletInfoContent
WalletHeaderPanel {
id: walletHeader
store: walletView.store
// Not Refactored Yet
// accountsModel: walletView.store.walletModelV2Inst.accountsView.accounts
// currentAccount: walletView.store.walletModelV2Inst.accountsView.currentAccount

View File

@ -22,6 +22,7 @@ Item {
property var currentAccount
property var enabledNetworksModel
property var allNetworksModel
property var store
signal copyText(string text)
signal toggleNetwork(int chainId)
@ -73,6 +74,7 @@ Item {
anchors.left: accountRow.left
addressWidth: 180
address: walletHeader.currentAccount? walletHeader.currentAccount.address : ""
store: walletHeader.store
}
NetworkSelectPanel {

View File

@ -482,6 +482,7 @@ Item {
Layout.fillWidth: true
Layout.alignment: Qt.AlignLeft | Qt.AlignTop
Layout.fillHeight: true
store: appMain.rootStore
}
Component {
@ -490,6 +491,7 @@ Item {
globalStore: appMain.rootStore
sendTransactionModal: sendModal
}
}
Loader {

View File

@ -16,6 +16,7 @@ Item {
property bool expanded: false
property int addressWidth
property int originalButtonWidth
property var store
Button {
id: control
@ -81,6 +82,7 @@ Item {
anchors.leftMargin: Style.current.smallPadding
anchors.verticalCenter: parent.verticalCenter
textToCopy: root.address
store: root.store
MouseArea {
anchors.fill: parent
propagateComposedEvents: true