-
Notifications
You must be signed in to change notification settings - Fork 173
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
[WCM] Implement missing ui + fix ui glitches #943
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,3 +31,5 @@ DerivedDataCache | |
*.ipa | ||
*.zip | ||
test_results/ | ||
|
||
Sources/WalletConnectModal/Secrets/secrets.json | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -132,7 +132,10 @@ let package = Package( | |
dependencies: ["WalletConnectUtils", "WalletConnectNetworking"]), | ||
.target( | ||
name: "WalletConnectModal", | ||
dependencies: ["QRCode", "WalletConnectSign"]), | ||
dependencies: ["QRCode", "WalletConnectSign"], | ||
exclude: ["Secrets/secrets.json.sample"], | ||
resources: [.copy("Secrets/secrets.json")] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Strange. You're ignoring this file by git, but it's required for WalletConnectModal SDK There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is ignored, so we don't commit actual secrets. This will pass if the file is not present, but to access the JSON with actual secrets, you need to bundle it with the target. |
||
), | ||
.target( | ||
name: "WalletConnectSync", | ||
dependencies: ["WalletConnectSigner"]), | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import Foundation | ||
|
||
#if DEBUG | ||
|
||
extension Listing { | ||
static let stubList: [Listing] = [ | ||
Listing(id: UUID().uuidString, name: "Sample Wallet", homepage: "https://example.com", order: 1, imageId: UUID().uuidString, app: Listing.App(ios: "https://example.com/download-ios", mac: "https://example.com/download-mac", safari: "https://example.com/download-safari"), mobile: Listing.Mobile(native: "sampleapp://deeplink", universal: "https://example.com/universal")), | ||
Listing(id: UUID().uuidString, name: "Awesome Wallet", homepage: "https://example.com/awesome", order: 2, imageId: UUID().uuidString, app: Listing.App(ios: "https://example.com/download-ios", mac: "https://example.com/download-mac", safari: "https://example.com/download-safari"), mobile: Listing.Mobile(native: "awesomeapp://deeplink", universal: "https://example.com/awesome/universal")), | ||
Listing(id: UUID().uuidString, name: "Cool Wallet", homepage: "https://example.com/cool", order: 3, imageId: UUID().uuidString, app: Listing.App(ios: "https://example.com/download-ios", mac: "https://example.com/download-mac", safari: "https://example.com/download-safari"), mobile: Listing.Mobile(native: "coolapp://deeplink", universal: "https://example.com/cool/universal")) | ||
] | ||
} | ||
|
||
#endif |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,6 @@ class WebSocketFactoryMock: WebSocketFactory { | |
} | ||
} | ||
|
||
@available(iOS 14.0, *) | ||
struct ModalContainerView_Previews: PreviewProvider { | ||
|
||
static var previews: some View { | ||
|
@@ -33,7 +32,8 @@ struct ModalContainerView_Previews: PreviewProvider { | |
struct Content: View { | ||
|
||
init() { | ||
let projectId = "9bfe94c9cbf74aaa0597094ef561f703" | ||
|
||
let projectId = Secrets.load().projectID | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Now we're taking Project ID from configuration. Why json file is better? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I'm not too keen on having two approaches how to share secrets/vars either. So any suggestions on how to do this better are more than welcome :D There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you can pass projectID to w3m in a config method like in
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can't believe we missed comiting proj id xd There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, this is how it will be done when actually integrating the modal SDK https://github.com/WalletConnect/WalletConnectSwiftV2/blob/9cead7d4443815687e02cd87ba888130225283fc/Sources/WalletConnectModal/WalletConnectModal.swift#L51-L57C8 but this is in the context of previews within SDK itself so I don't have any projectID injected from elsewhere. |
||
let metadata = AppMetadata( | ||
name: "Showcase App", | ||
description: "Showcase description", | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where it used? Other team also need to have this file locally?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only needed if you want to run WalletConnectModal previews. If you don't have it, you will get a somewhat explanatory error to create it.