-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
26af0f2
commit 5455532
Showing
291 changed files
with
203 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
import SwiftUI | ||
import Web3Modal | ||
import Web3ModalUI | ||
|
||
struct ComponentLibraryView: View { | ||
var body: some View { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
import SwiftUI | ||
import Web3Modal | ||
import Web3ModalUI | ||
|
||
struct ContentView: View { | ||
var body: some View { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,2 @@ | ||
import Foundation | ||
|
||
extension Collection { | ||
/// Returns the element at the specified index if it is within bounds, otherwise nil. | ||
subscript(safe index: Index) -> Element? { | ||
return indices.contains(index) ? self[index] : nil | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import SwiftUI | ||
import Web3ModalUI | ||
|
||
struct ConnectWithQRCode: View { | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import SwiftUI | ||
import Web3ModalUI | ||
|
||
struct WhatIsWalletView: View { | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import Foundation | ||
|
||
public extension Foundation.Bundle { | ||
private class CurrentBundle {} | ||
|
||
/// We override `resource_bundle_accessor.swift` in order to provide correct | ||
/// path for SwiftUI Preview. | ||
static var UIModule: Bundle = { | ||
let moduleBundleNameInPackage = "swift-web3modal_Web3ModalUI" | ||
let candidates = [ | ||
Bundle.main.resourceURL, | ||
Bundle(for: CurrentBundle.self).resourceURL, | ||
Bundle.main.bundleURL, | ||
|
||
/// Provide extra paths to search for resource. | ||
/// Bundle should be present here when running previews from a different | ||
/// package (this is the path to `__/Debug-iphonesimulator/__`). | ||
/// This avoids following error message | ||
/// `resource_bundle_accessor.swift:27: Fatal error: unable to find bundle named swift-web3modal_Web3ModalUI` | ||
Bundle(for: CurrentBundle.self).resourceURL? | ||
.deletingLastPathComponent() | ||
.deletingLastPathComponent() | ||
.deletingLastPathComponent(), | ||
|
||
Bundle(for: CurrentBundle.self).resourceURL? | ||
.deletingLastPathComponent() | ||
.deletingLastPathComponent() | ||
] | ||
|
||
for candidate in candidates { | ||
let bundleName = candidate?.appendingPathComponent(moduleBundleNameInPackage + ".bundle") | ||
|
||
if let bundle = bundleName.flatMap(Bundle.init(url:)) { | ||
print("\(bundle.bundlePath.description)") | ||
return bundle | ||
} | ||
} | ||
|
||
fatalError("unable to find bundle \(moduleBundleNameInPackage.description)") | ||
}() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.