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

Fixed the issue where account information retrieved from Wallet was being displayed twice. #1374

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open
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 @@ -7,6 +7,10 @@ struct AccountDetails {
let chain: String
let methods: [String]
let account: String

var id: String {
return "\(account)_\(chain)"
}
}


Expand Down
1 change: 1 addition & 0 deletions Example/DApp/Modules/Sign/SignPresenter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ extension SignPresenter {
self.session = session
session.namespaces.values.forEach { namespace in
namespace.accounts.forEach { account in
accountsDetails.removeAll()
accountsDetails.append(
AccountDetails(
chain: account.blockchainIdentifier,
Expand Down
2 changes: 1 addition & 1 deletion Example/DApp/Modules/Sign/SignView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ struct SignView: View {
.padding(12)
} else {
VStack {
ForEach(presenter.accountsDetails, id: \.chain) { account in
ForEach(presenter.accountsDetails, id: \.id) { account in
Button {
presenter.presentSessionAccount(sessionAccount: account)
} label: {
Expand Down