Skip to content

Commit

Permalink
RCfM bug fixes (#1192)
Browse files Browse the repository at this point in the history
  • Loading branch information
GhenadieVP committed Jul 1, 2024
1 parent 35be713 commit 457000b
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 24 deletions.
10 changes: 5 additions & 5 deletions RadixWallet.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -919,7 +919,7 @@
830EA9E92AEBA7C5004C8051 /* EntitiesVisibilityClient+Test.swift in Sources */ = {isa = PBXBuildFile; fileRef = 830EA9E82AEBA7C5004C8051 /* EntitiesVisibilityClient+Test.swift */; };
831F0CED2C21819000D6F5BF /* Sargon in Frameworks */ = {isa = PBXBuildFile; productRef = 831F0CEC2C21819000D6F5BF /* Sargon */; };
831F0CEF2C25728E00D6F5BF /* RadixConnectMobileSessionStorage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 831F0CEE2C25728E00D6F5BF /* RadixConnectMobileSessionStorage.swift */; };
831F0CF22C25897500D6F5BF /* DappInteractionOriginVerification +View.swift in Sources */ = {isa = PBXBuildFile; fileRef = 831F0CF12C25897500D6F5BF /* DappInteractionOriginVerification +View.swift */; };
831F0CF22C25897500D6F5BF /* DappInteractionOriginVerification+View.swift in Sources */ = {isa = PBXBuildFile; fileRef = 831F0CF12C25897500D6F5BF /* DappInteractionOriginVerification+View.swift */; };
831F0CF42C294BAA00D6F5BF /* DeepLinkHandlerClient+Live.swift in Sources */ = {isa = PBXBuildFile; fileRef = 831F0CF32C294BAA00D6F5BF /* DeepLinkHandlerClient+Live.swift */; };
831F0CF62C294C0D00D6F5BF /* DeepLinkHandlerClient+Test.swift in Sources */ = {isa = PBXBuildFile; fileRef = 831F0CF52C294C0D00D6F5BF /* DeepLinkHandlerClient+Test.swift */; };
832868652BE2641800902126 /* DappInteractionOriginVerification.swift in Sources */ = {isa = PBXBuildFile; fileRef = 832868642BE2641800902126 /* DappInteractionOriginVerification.swift */; };
Expand Down Expand Up @@ -2049,7 +2049,7 @@
830EA9E62AEBA793004C8051 /* EntitiesVisibilityClient+Live.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "EntitiesVisibilityClient+Live.swift"; sourceTree = "<group>"; };
830EA9E82AEBA7C5004C8051 /* EntitiesVisibilityClient+Test.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "EntitiesVisibilityClient+Test.swift"; sourceTree = "<group>"; };
831F0CEE2C25728E00D6F5BF /* RadixConnectMobileSessionStorage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RadixConnectMobileSessionStorage.swift; sourceTree = "<group>"; };
831F0CF12C25897500D6F5BF /* DappInteractionOriginVerification +View.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "DappInteractionOriginVerification +View.swift"; sourceTree = "<group>"; };
831F0CF12C25897500D6F5BF /* DappInteractionOriginVerification+View.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "DappInteractionOriginVerification+View.swift"; sourceTree = "<group>"; };
831F0CF32C294BAA00D6F5BF /* DeepLinkHandlerClient+Live.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "DeepLinkHandlerClient+Live.swift"; sourceTree = "<group>"; };
831F0CF52C294C0D00D6F5BF /* DeepLinkHandlerClient+Test.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "DeepLinkHandlerClient+Test.swift"; sourceTree = "<group>"; };
832868642BE2641800902126 /* DappInteractionOriginVerification.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DappInteractionOriginVerification.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -5673,7 +5673,7 @@
isa = PBXGroup;
children = (
832868642BE2641800902126 /* DappInteractionOriginVerification.swift */,
831F0CF12C25897500D6F5BF /* DappInteractionOriginVerification +View.swift */,
831F0CF12C25897500D6F5BF /* DappInteractionOriginVerification+View.swift */,
);
path = DappOriginVerification;
sourceTree = "<group>";
Expand Down Expand Up @@ -7580,7 +7580,7 @@
48CFC3382ADC10D900E77A5C /* PreviewResult.swift in Sources */,
48CFC2C82ADC10D900E77A5C /* ResourceAsset+Reducer.swift in Sources */,
83856D632B0279080026452A /* VerifyMnemonic.swift in Sources */,
831F0CF22C25897500D6F5BF /* DappInteractionOriginVerification +View.swift in Sources */,
831F0CF22C25897500D6F5BF /* DappInteractionOriginVerification+View.swift in Sources */,
48CFC5332ADC10DA00E77A5C /* StateEntityNonFungibleResourceVaultsPageRequest.swift in Sources */,
48CFC48A2ADC10DA00E77A5C /* OnLedgerEntitiesClient+CreateEntity.swift in Sources */,
A4ECE27A2BEEB01800468BF6 /* CloudBackupClient+Live.swift in Sources */,
Expand Down Expand Up @@ -8550,7 +8550,7 @@
repositoryURL = "https://github.com/radixdlt/sargon";
requirement = {
kind = exactVersion;
version = 1.0.20;
version = 1.0.21;
};
};
8318BB172BC8403800057BCB /* XCRemoteSwiftPackageReference "swift-custom-dump" */ = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"originHash" : "4eb650ade57061cd1cf989ce8f615547774e9303f591ff57a76f3f2c04cdbd07",
"originHash" : "7d3590b225945abb1bc0ab6c684b005c28c64bdc204afcc2d34c3e379ef8a3c8",
"pins" : [
{
"identity" : "anycodable",
Expand Down Expand Up @@ -114,8 +114,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/radixdlt/sargon",
"state" : {
"revision" : "7c63f588761857ec1068401d66215909ee9e4208",
"version" : "1.0.20"
"revision" : "6db42884e1127b55987a20a15ddf2ad0aa7069e8",
"version" : "1.0.21"
}
},
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@

extension Text {
/// Shows a markdown string, where any italics sections are shown in the provided color
public init(markdown: String, italicsColor: Color) {
let attributed = AttributedString(markdown: markdown, replaceItalicsWith: italicsColor)
public init(markdown: String, emphasizedColor: Color) {
let attributed = AttributedString(markdown: markdown, replaceEmphasizedWith: emphasizedColor)
self.init(attributed)
}
}
Expand All @@ -12,19 +11,19 @@ extension AttributedString {
self = update(AttributedString(string)) { $0.foregroundColor = foregroundColor }
}

public init(markdown: some StringProtocol, replaceItalicsWith italicsColor: Color) {
public init(markdown: some StringProtocol, replaceEmphasizedWith emphasizedColor: Color) {
let string = String(markdown)
guard let attributed = try? AttributedString(markdown: string) else {
self.init(string)
return
}

self = attributed.replacingAttributes(.italics, with: .foregroundColor(italicsColor))
self = attributed.replacingAttributes(.emphasized, with: .foregroundColor(emphasizedColor))
}
}

extension AttributeContainer {
public static let italics: AttributeContainer = intent(.emphasized)
public static let emphasized: AttributeContainer = intent(.emphasized)

public static func intent(_ intent: InlinePresentationIntent) -> AttributeContainer {
var result = AttributeContainer()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ extension DappInteractionOriginVerification {
.textStyle(.sheetTitle)
.padding(.bottom, .large2)

Text(L10n.MobileConnect.linkSubtitle(store.dAppMetadata.name))
Text(markdown: L10n.MobileConnect.linkSubtitle(store.dAppMetadata.name), emphasizedColor: .app.gray1)
.foregroundColor(.app.gray1)
.textStyle(.body1Link)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,13 +171,7 @@ struct DappInteractor: Sendable, FeatureReducer {
default: break
}

if request.route.isDeepLink {
// dismiss current request, wallet request takes precedence
state.currentModal = nil
state.requestQueue.insert(request, at: 0)
} else {
state.requestQueue.append(request)
}
state.requestQueue.append(request)

return presentQueuedRequestIfNeededEffect(for: &state)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ struct DappHeader: View {
.lineSpacing(0)
.textStyle(.sheetTitle)

Text(markdown: subtitle, italicsColor: .app.gray1)
Text(markdown: subtitle, emphasizedColor: .app.gray1)
.foregroundColor(.app.gray2)
.textStyle(.secondaryHeader)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ extension Profile {
let dapp = try validateAuthorizedPersonas(of: unvalidatedAuthorizedDapp)
let networkID = dapp.networkID
let network = try network(id: networkID)
if network.authorizedDapps.contains(dapp) {
if network.authorizedDapps.contains(where: { $0.dAppDefinitionAddress == dapp.dAppDefinitionAddress }) {
try updateAuthorizedDapp(dapp)
} else {
try addAuthorizedDapp(dapp)
Expand Down

0 comments on commit 457000b

Please sign in to comment.