Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/building simple send #16868

Merged
merged 10 commits into from
Dec 24, 2024
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
43 changes: 43 additions & 0 deletions storybook/pages/CollectiblesSelectionAdaptorPage.qml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import AppLayouts.Wallet.controls 1.0
import AppLayouts.Wallet.adaptors 1.0
import utils 1.0

import Models 1.0
import Storybook 1.0

import SortFilterProxyModel 0.2
Expand All @@ -24,6 +25,8 @@ Pane {
// collection 2
{
tokenId: "id_3",
symbol: "abc",
chainId: NetworksModel.mainnetChainId,
name: "Multi-sequencer Test NFT 1",
contractAddress: "contract_2",
collectionName: "Multi-sequencer Test NFT",
Expand All @@ -43,6 +46,8 @@ Pane {
},
{
tokenId: "id_4",
symbol: "def",
chainId: NetworksModel.mainnetChainId,
name: "Multi-sequencer Test NFT 2",
contractAddress: "contract_2",
collectionName: "Multi-sequencer Test NFT",
Expand All @@ -62,6 +67,8 @@ Pane {
},
{
tokenId: "id_5",
symbol: "ghi",
chainId: NetworksModel.mainnetChainId,
name: "Multi-sequencer Test NFT 3",
contractAddress: "contract_2",
collectionName: "Multi-sequencer Test NFT",
Expand All @@ -82,6 +89,8 @@ Pane {
// collection 1
{
tokenId: "id_1",
symbol: "jkl",
chainId: NetworksModel.mainnetChainId,
name: "Genesis",
contractAddress: "contract_1",
collectionName: "ERC-1155 Faucet",
Expand All @@ -106,6 +115,8 @@ Pane {
},
{
tokenId: "id_2",
symbol: "mno",
chainId: NetworksModel.mainnetChainId,
name: "QAERC1155",
contractAddress: "contract_1",
collectionName: "ERC-1155 Faucet",
Expand All @@ -126,6 +137,8 @@ Pane {
// collection 3, community token
{
tokenId: "id_6",
symbol: "pqr",
chainId: NetworksModel.optChainId,
name: "My Token",
contractAddress: "contract_3",
collectionName: "My Token",
Expand All @@ -145,6 +158,8 @@ Pane {
},
{
tokenId: "id_7",
symbol: "stu",
chainId: NetworksModel.optChainId,
name: "My Token",
contractAddress: "contract_3",
collectionName: "My Token",
Expand All @@ -164,6 +179,8 @@ Pane {
},
{
tokenId: "id_8",
symbol: "vwx",
chainId: NetworksModel.optChainId,
name: "My Token",
contractAddress: "contract_3",
collectionName: "My Token",
Expand All @@ -183,6 +200,8 @@ Pane {
},
{
tokenId: "id_9",
symbol: "yz1",
chainId: NetworksModel.optChainId,
name: "My Other Token",
contractAddress: "contract_4",
collectionName: "My Other Token",
Expand All @@ -202,6 +221,8 @@ Pane {
},
{
tokenId: "id_10",
symbol: "234",
chainId: NetworksModel.arbChainId,
name: "My Community 2 Token",
contractAddress: "contract_5",
collectionName: "My Community 2 Token",
Expand All @@ -221,6 +242,8 @@ Pane {
},
{
tokenId: "id_11",
symbol: "567",
chainId: NetworksModel.arbChainId,
name: "My Community 2 Token",
contractAddress: "contract_5",
collectionName: "My Community 2 Token",
Expand All @@ -240,6 +263,8 @@ Pane {
},
{
tokenId: "id_11",
symbol: "8910",
chainId: NetworksModel.arbChainId,
name: "My Community 2 Token",
contractAddress: "contract_5",
collectionName: "My Community 2 Token",
Expand All @@ -259,6 +284,8 @@ Pane {
},
{
tokenId: "id_12",
symbol: "111213",
chainId: NetworksModel.arbChainId,
name: "My Community 2 Token",
contractAddress: "contract_5",
collectionName: "My Community 2 Token",
Expand All @@ -278,6 +305,8 @@ Pane {
},
{
tokenId: "id_13",
symbol: "141516",
chainId: NetworksModel.arbChainId,
name: "My Community 2 Token",
contractAddress: "contract_5",
collectionName: "My Community 2 Token",
Expand Down Expand Up @@ -312,6 +341,8 @@ Pane {
CollectiblesSelectionAdaptor {
id: adaptor

networksModel: NetworksModel.flatNetworks
enabledChainIds: [networksCombobox.currentValue]
collectiblesModel: listModel
accountKey: accountsSelector.selection
}
Expand All @@ -333,6 +364,18 @@ Pane {
}
}

RowLayout {
Label { text: "Enabled Networks:" }

ComboBox {
id: networksCombobox
model: NetworksModel.flatNetworks
textRole: "chainName"
valueRole: "chainId"
currentIndex: 0
}
}

RowLayout {
GenericListView {
label: "Input model"
Expand Down
62 changes: 62 additions & 0 deletions storybook/pages/SendModalFooterPage.qml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
import QtQuick 2.14
import QtQuick.Controls 2.14

import StatusQ.Core.Theme 0.1

import Storybook 1.0

import AppLayouts.Wallet.views 1.0

SplitView {
orientation: Qt.Vertical
Logs { id: logs }

Rectangle {
SplitView.fillHeight: true
SplitView.fillWidth: true
color: Theme.palette.indirectColor1

SendModalFooter {
id: footer
anchors.centerIn: parent
width: 595

loading: loadingCheckbox.checked
error: errorCheckbox.checked

onReviewSendClicked: logs.logEvent("review send clicked")
}
}

LogsAndControlsPanel {
id: logsAndControlsPanel

SplitView.minimumHeight: 100
SplitView.preferredHeight: 200

logsView.logText: logs.logText

Column {
CheckBox {
id: loadingCheckbox
text: "loading"
}

CheckBox {
id: errorCheckbox
text: "error"
}

Button {
text: "set fees values"
onClicked: {
loadingCheckbox.checked = false
footer.estimatedTime = "~60s"
footer.estimatedFees = "1.45 EUR"
}
}
}
}
}

// category: Views
Loading