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

1.0.5 #48

Merged
merged 48 commits into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
bea36c6
Add WalletconnectAccount
llbartekll Jun 21, 2024
7796bb0
add AccountClientMock
llbartekll Jun 21, 2024
64ec6ae
fix build
llbartekll Jun 21, 2024
403a161
savepoint
llbartekll Jun 21, 2024
47fc7bd
update signer
llbartekll Jun 25, 2024
ee89248
savepoint
llbartekll Jun 26, 2024
246c517
savepoint
llbartekll Jun 26, 2024
a08e201
savepoint
llbartekll Jun 26, 2024
365fc01
savepoint
llbartekll Jun 26, 2024
d3cc0d1
update transaction properties
llbartekll Jul 2, 2024
b899294
Merge branch 'monorepo' of github.com:reown-com/reown-swift into acco…
llbartekll Sep 10, 2024
8f8080a
implement sendCalls for a single transaction
llbartekll Sep 10, 2024
c6bc162
feat(smart account): update smart account implementation (#5)
jackpooleywc Sep 11, 2024
9e3afc8
feat: Safe integration
chris13524 Sep 12, 2024
7fad357
savepoint
llbartekll Sep 12, 2024
cdc0729
update config file
llbartekll Sep 12, 2024
5fe606c
set up env vars
llbartekll Sep 12, 2024
4d8a36d
add session properties builder
llbartekll Sep 12, 2024
487e34c
fix session properties
llbartekll Sep 12, 2024
f131d7f
Merge branch 'monorepo' of github.com:reown-com/reown-swift into acco…
llbartekll Sep 12, 2024
c8a70a7
Merge branch 'account_integration' of github.com:reown-com/reown-swif…
chris13524 Sep 12, 2024
6665575
fix: default to local config
chris13524 Sep 12, 2024
89042a2
Merge pull request #6 from reown-com/feat/safe-integration
chris13524 Sep 12, 2024
ebca2f6
add sa manager
llbartekll Sep 13, 2024
2b99ba8
savepoint
llbartekll Sep 13, 2024
5927621
update signer
llbartekll Sep 13, 2024
8396787
fix
llbartekll Sep 13, 2024
7fe1990
wait for receipt
llbartekll Sep 13, 2024
f4fabcf
Merge pull request #7 from reown-com/smart-account-enabler
llbartekll Sep 17, 2024
46820a1
fix build
llbartekll Sep 17, 2024
2f648d2
update package
llbartekll Sep 23, 2024
21bde1f
savepoint
llbartekll Sep 24, 2024
aa64933
savepoint
llbartekll Sep 25, 2024
ab7e881
cleanup
llbartekll Sep 25, 2024
05d7665
uncomment wait for receipt
llbartekll Sep 26, 2024
2e2d243
remove simple account integration
llbartekll Oct 4, 2024
16c6b9e
Merge pull request #21 from reown-com/yttrium-package
llbartekll Oct 7, 2024
b37e8a4
savepoint
llbartekll Oct 8, 2024
77238ca
fix userop signing method
llbartekll Oct 9, 2024
8785e01
upgrade yttrium version
llbartekll Oct 9, 2024
7ae3bfd
Merge pull request #30 from reown-com/feat/mutltistep-send-transactions
llbartekll Oct 9, 2024
05f45fe
Merge branch 'develop' of github.com:reown-com/reown-swift into accou…
llbartekll Oct 11, 2024
891e11a
remove yttrium from reown package
llbartekll Oct 11, 2024
28942b5
fix signer
llbartekll Oct 11, 2024
74667a8
Merge pull request #34 from reown-com/account_integration
llbartekll Oct 13, 2024
71a2438
delete session on serializer error
llbartekll Oct 28, 2024
b6892a9
Merge pull request #44 from reown-com/chore/fix-session-deletion
llbartekll Oct 29, 2024
2a01fd5
Set User Agent
llbartekll Oct 31, 2024
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 @@ -482,6 +482,90 @@
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "WalletConnectModal"
BuildableName = "WalletConnectModal"
BlueprintName = "WalletConnectModal"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "WalletConnectNotify"
BuildableName = "WalletConnectNotify"
BlueprintName = "WalletConnectNotify"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "YttriumWrapper"
BuildableName = "YttriumWrapper"
BlueprintName = "YttriumWrapper"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "ReownAppKitUI"
BuildableName = "ReownAppKitUI"
BlueprintName = "ReownAppKitUI"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "ReownRouter"
BuildableName = "ReownRouter"
BlueprintName = "ReownRouter"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "ReownWalletKit"
BuildableName = "ReownWalletKit"
BlueprintName = "ReownWalletKit"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
Expand Down Expand Up @@ -606,6 +690,16 @@
ReferencedContainer = "container:">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "EventsTests"
BuildableName = "EventsTests"
BlueprintName = "EventsTests"
ReferencedContainer = "container:">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
Expand Down
6 changes: 6 additions & 0 deletions Configuration.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,9 @@ EXPLORER_HOST = explorer-api.walletconnect.com
// WALLETAPP_SENTRY_DSN = WALLETAPP_SENTRY_DSN

// MIXPANEL_TOKEN = MIXPANEL_TOKEN

// pimloco bundler url including api key
// PIMLICO_BUNDLER_URL = PIMLICO_BUNDLER_URL

// rpc url
// RPC_URL = RPC_URL
1 change: 1 addition & 0 deletions Example/DApp/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import WalletConnectSign
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.

return true
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ import WalletConnectSign
struct AccountDetails {
let chain: String
let methods: [String]
let account: String
let address: String
var account: String {
"\(chain):\(address)"
}
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ final class SessionAccountPresenter: ObservableObject {
}

func copyUri() {
UIPasteboard.general.string = sessionAccount.account
UIPasteboard.general.string = sessionAccount.address
}
}

Expand Down Expand Up @@ -128,17 +128,17 @@ extension SessionAccountPresenter.Errors: LocalizedError {
// MARK: - Transaction Stub
private enum Stub {
struct Transaction: Codable {
let from, to, data, gas: String
let from, to, data, gasLimit: String
let gasPrice, value, nonce: String
}

static let tx = [Transaction(from: "0x9b2055d370f73ec7d8a03e965129118dc8f5bf83",
to: "0x9b2055d370f73ec7d8a03e965129118dc8f5bf83",
data: "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675",
gas: "0x76c0",
gasPrice: "0x9184e72a000",
value: "0x9184e72a",
nonce: "0x117")]
data: "0x",
gasLimit: "0x5208",
gasPrice: "0x013e3d2ed4",
value: "0x00",
nonce: "0x09")]
static let eth_signTypedData = """
{
"types": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ struct SessionAccountView: View {
ScrollView {
VStack(spacing: 12) {
networkView(title: String(presenter.sessionAccount.chain.split(separator: ":").first ?? ""))
accountView(address: presenter.sessionAccount.account)
accountView(address: presenter.sessionAccount.address)
methodsView(methods: presenter.sessionAccount.methods)

Spacer()
Expand Down
9 changes: 8 additions & 1 deletion Example/DApp/Modules/Sign/SignPresenter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,13 @@ extension SignPresenter {
}
.store(in: &subscriptions)

Sign.instance.sessionSettlePublisher
.receive(on: DispatchQueue.main)
.sink { [unowned self] _ in
self.getSession()
}
.store(in: &subscriptions)

Sign.instance.authResponsePublisher
.receive(on: DispatchQueue.main)
.sink { [unowned self] response in
Expand Down Expand Up @@ -218,7 +225,7 @@ extension SignPresenter {
AccountDetails(
chain: account.blockchainIdentifier,
methods: Array(namespace.methods),
account: account.address
address: account.address
)
)
}
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 @@ -84,7 +84,7 @@ struct SignView: View {
.padding(12)
} else {
VStack {
ForEach(presenter.accountsDetails, id: \.chain) { account in
ForEach(presenter.accountsDetails, id: \.account) { account in
Button {
presenter.presentSessionAccount(sessionAccount: account)
} label: {
Expand Down
27 changes: 27 additions & 0 deletions Example/ExampleApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@
84474A0129B9EB74005F520B /* Starscream in Frameworks */ = {isa = PBXBuildFile; productRef = 84474A0029B9EB74005F520B /* Starscream */; };
84474A0229B9ECA2005F520B /* DefaultSocketFactory.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5629AEF2877F73000094373 /* DefaultSocketFactory.swift */; };
8448F1D427E4726F0000B866 /* WalletConnect in Frameworks */ = {isa = PBXBuildFile; productRef = 8448F1D327E4726F0000B866 /* WalletConnect */; };
8454EF0A2C9421B600B5529E /* SmartAccountManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8454EF092C9421B600B5529E /* SmartAccountManager.swift */; };
845B8D8C2934B36C0084A966 /* Account.swift in Sources */ = {isa = PBXBuildFile; fileRef = 845B8D8B2934B36C0084A966 /* Account.swift */; };
846CA5C82CB901F8005E8C15 /* Yttrium in Frameworks */ = {isa = PBXBuildFile; productRef = 846CA5C72CB901F8005E8C15 /* Yttrium */; };
846E359F2C00654F00E63DF4 /* ConfigModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = 846E359E2C00654F00E63DF4 /* ConfigModule.swift */; };
846E35A22C0065AD00E63DF4 /* ConfigRouter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 846E35A12C0065AD00E63DF4 /* ConfigRouter.swift */; };
846E35A42C0065B600E63DF4 /* ConfigPresenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 846E35A32C0065B600E63DF4 /* ConfigPresenter.swift */; };
Expand All @@ -47,6 +49,7 @@
84733CD32C1C2A4B001B2850 /* AlertPresenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84AEC2502B4D42C100E27A5B /* AlertPresenter.swift */; };
84733CD42C1C2C24001B2850 /* ProfilingService.swift in Sources */ = {isa = PBXBuildFile; fileRef = A50B6A372B06697B00162B01 /* ProfilingService.swift */; };
84733CD52C1C2CEB001B2850 /* InputConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = C56EE25D293F56D6004840D1 /* InputConfig.swift */; };
84733CDA2C258BDB001B2850 /* SmartAccount.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84733CD92C258BDB001B2850 /* SmartAccount.swift */; };
847BD1D62989492500076C90 /* MainViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 847BD1D12989492500076C90 /* MainViewController.swift */; };
847BD1D82989492500076C90 /* MainModule.swift in Sources */ = {isa = PBXBuildFile; fileRef = 847BD1D32989492500076C90 /* MainModule.swift */; };
847BD1D92989492500076C90 /* MainPresenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 847BD1D42989492500076C90 /* MainPresenter.swift */; };
Expand Down Expand Up @@ -339,6 +342,7 @@
844511C92C8BA69D00A6A86C /* AppKitLab.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = AppKitLab.entitlements; sourceTree = "<group>"; };
844749F329B9E5B9005F520B /* RelayIntegrationTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RelayIntegrationTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
844749F529B9E5B9005F520B /* RelayClientEndToEndTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RelayClientEndToEndTests.swift; sourceTree = "<group>"; };
8454EF092C9421B600B5529E /* SmartAccountManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SmartAccountManager.swift; sourceTree = "<group>"; };
845AA7D929BA1EBA00F33739 /* IntegrationTests.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; name = IntegrationTests.xctestplan; path = ExampleApp.xcodeproj/IntegrationTests.xctestplan; sourceTree = "<group>"; };
845AA7DC29BB424800F33739 /* SmokeTests.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = SmokeTests.xctestplan; sourceTree = "<group>"; };
845B8D8B2934B36C0084A966 /* Account.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Account.swift; sourceTree = "<group>"; };
Expand All @@ -347,6 +351,7 @@
846E35A32C0065B600E63DF4 /* ConfigPresenter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConfigPresenter.swift; sourceTree = "<group>"; };
846E35A52C0065C100E63DF4 /* ConfigView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConfigView.swift; sourceTree = "<group>"; };
846E35A72C006C5600E63DF4 /* Constants.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constants.swift; sourceTree = "<group>"; };
84733CD92C258BDB001B2850 /* SmartAccount.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SmartAccount.swift; sourceTree = "<group>"; };
847BD1D12989492500076C90 /* MainViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MainViewController.swift; sourceTree = "<group>"; };
847BD1D32989492500076C90 /* MainModule.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MainModule.swift; sourceTree = "<group>"; };
847BD1D42989492500076C90 /* MainPresenter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MainPresenter.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -629,6 +634,7 @@
A5B6C0F52A6EAB2800927332 /* WalletConnectNotify in Frameworks */,
84943C7D2A9BA328007EBAC2 /* Mixpanel in Frameworks */,
8421447F2C81863A004FF494 /* ReownWalletKit in Frameworks */,
846CA5C82CB901F8005E8C15 /* Yttrium in Frameworks */,
8421447D2C80A544004FF494 /* ReownAppKitUI in Frameworks */,
84CA52172C88965C0069BB33 /* ReownRouter in Frameworks */,
);
Expand Down Expand Up @@ -1008,6 +1014,8 @@
isa = PBXGroup;
children = (
A5D610CC2AB3592F00C20083 /* ListingsSertice */,
84733CD92C258BDB001B2850 /* SmartAccount.swift */,
8454EF092C9421B600B5529E /* SmartAccountManager.swift */,
);
path = BusinessLayer;
sourceTree = "<group>";
Expand Down Expand Up @@ -1630,6 +1638,7 @@
8421447C2C80A544004FF494 /* ReownAppKitUI */,
8421447E2C81863A004FF494 /* ReownWalletKit */,
84CA52162C88965C0069BB33 /* ReownRouter */,
846CA5C72CB901F8005E8C15 /* Yttrium */,
);
productName = ChatWallet;
productReference = C56EE21B293F55ED004840D1 /* WalletApp.app */;
Expand Down Expand Up @@ -1708,6 +1717,7 @@
84943C792A9BA206007EBAC2 /* XCRemoteSwiftPackageReference "mixpanel-swift" */,
84AEC2522B4D43CD00E27A5B /* XCRemoteSwiftPackageReference "SwiftMessages" */,
844511B82C8B6BC800A6A86C /* XCRemoteSwiftPackageReference "atlantis" */,
846CA5C62CB901BC005E8C15 /* XCRemoteSwiftPackageReference "yttrium" */,
);
productRefGroup = 764E1D3D26F8D3FC00A1FB15 /* Products */;
projectDirPath = "";
Expand Down Expand Up @@ -1989,6 +1999,7 @@
C5B2F6F729705293000DBA0E /* SessionRequestRouter.swift in Sources */,
C56EE24F293F566D004840D1 /* WalletView.swift in Sources */,
C55D34B22965FB750004314A /* SessionProposalView.swift in Sources */,
84733CDA2C258BDB001B2850 /* SmartAccount.swift in Sources */,
C56EE248293F566D004840D1 /* ScanQR.swift in Sources */,
847BD1EB298A87AB00076C90 /* SubscriptionsViewModel.swift in Sources */,
C55D349B2965BC2F0004314A /* TagsView.swift in Sources */,
Expand Down Expand Up @@ -2020,6 +2031,7 @@
847BD1E5298A806800076C90 /* NotificationsPresenter.swift in Sources */,
A50D53C12ABA055700A4FD8B /* NotifyPreferencesModule.swift in Sources */,
A50B6A382B06697B00162B01 /* ProfilingService.swift in Sources */,
8454EF0A2C9421B600B5529E /* SmartAccountManager.swift in Sources */,
A5B4F7C52ABB20AE0099AF7C /* SubscriptionRouter.swift in Sources */,
C55D3496295DFA750004314A /* WelcomeInteractor.swift in Sources */,
C5B2F6FC297055B0000DBA0E /* SOLSigner.swift in Sources */,
Expand Down Expand Up @@ -2564,6 +2576,7 @@
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = WalletApp/Other/Info.plist;
INFOPLIST_KEY_LSApplicationCategoryType = "";
INFOPLIST_KEY_NSCameraUsageDescription = "Camera access for scanning QR code";
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
Expand Down Expand Up @@ -2602,6 +2615,7 @@
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = WalletApp/Other/Info.plist;
INFOPLIST_KEY_LSApplicationCategoryType = "";
INFOPLIST_KEY_NSCameraUsageDescription = "Camera access for scanning QR code";
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
Expand Down Expand Up @@ -2755,6 +2769,14 @@
minimumVersion = 1.24.0;
};
};
846CA5C62CB901BC005E8C15 /* XCRemoteSwiftPackageReference "yttrium" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/WalletConnect/yttrium";
requirement = {
kind = upToNextMinorVersion;
minimumVersion = 0.1.0;
};
};
84943C792A9BA206007EBAC2 /* XCRemoteSwiftPackageReference "mixpanel-swift" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/mixpanel/mixpanel-swift";
Expand Down Expand Up @@ -2880,6 +2902,11 @@
isa = XCSwiftPackageProductDependency;
productName = WalletConnect;
};
846CA5C72CB901F8005E8C15 /* Yttrium */ = {
isa = XCSwiftPackageProductDependency;
package = 846CA5C62CB901BC005E8C15 /* XCRemoteSwiftPackageReference "yttrium" */;
productName = Yttrium;
};
8486EDD22B4F2EA6008E53C3 /* SwiftMessages */ = {
isa = XCSwiftPackageProductDependency;
package = 84AEC2522B4D43CD00E27A5B /* XCRemoteSwiftPackageReference "SwiftMessages" */;
Expand Down
Loading
Loading