chore(storybook): fix TransactionDetailViewPage to test links

This commit is contained in:
Stefan 2024-03-15 18:01:53 +02:00 committed by Stefan Dunca
parent 5d827ecf77
commit f12c6dfa40
2 changed files with 32 additions and 2 deletions

View File

@ -140,13 +140,14 @@ SplitView {
property int timestamp: Date.now() / 1000
property int txStatus: 0
property string type: "eth"
property string from: "0x29D7d1dd5B6f9C864d9db560D72a247c178aE86B"
property string to: "0x4de3f6278C0DdFd3F29df9DcD979038F5c7bbc35"
property string from: "eth:arb:opt:0xb38e8c17e38363af6ebdcb3dae12e0243582891d"
property string to: "0xBE0eB53F46cd790Cd13851d5EFf43D12404d33E8"
property bool isNFT: false
property string tokenID: "4981676894159712808201908443964193325271219637660871887967796332739046670337"
property string nftName: "Happy Meow"
property string nftImageUrl: Style.png("collectibles/HappyMeow")
property string symbol: "ETH"
property int txType: Constants.TransactionType.Send
readonly property var value: QtObject {
property real amount: amountSpinbox.realValue
@ -181,6 +182,12 @@ SplitView {
property var mixedcaseAddress: root.isIncoming ? transactionData.to : transactionData.from
}
QtObject {
id: networkConnectionStoreMockup
property bool sendBuyBridgeEnabled: true
}
QtObject {
id: controllerMockup
@ -226,6 +233,7 @@ SplitView {
contactsStore: contactsStoreMockup
controller: controllerMockup
overview: overviewMockup
networkConnectionStore: networkConnectionStoreMockup
}
}
}

View File

@ -0,0 +1,22 @@
import QtQuick 2.15
// Required mock of: src/app/modules/main/wallet_section/accounts/view.nim
Item {
readonly property string contextPropertyName: "walletSectionAccounts"
// Required
//
function getNameByAddress(address) {
return "Name Mock " + address.substring(0, 5)
}
//
// Silence warnings
readonly property QtObject overview: QtObject {
readonly property string mixedcaseAddress: ""
}
readonly property ListModel mixedcaseAddress: ListModel {}
signal walletAccountRemoved(string address)
}