Fix test compilation issues

Signed-off-by: Daniel D’Aquino <daniel@daquino.me>
This commit is contained in:
Daniel D’Aquino
2025-10-13 15:16:54 -07:00
parent 991a4a86e6
commit ab2c16288b
8 changed files with 50 additions and 34 deletions

View File

@@ -79,7 +79,8 @@ final class WalletConnectTests: XCTestCase {
XCTAssertEqual(url_2.relay.url.absoluteString, relay_2)
}
func testNWCEphemeralRelay() {
@MainActor
func testNWCEphemeralRelay() async {
let sec = "8ba3a6b3b57d0f4211bb1ea4d8d1e351a367e9b4ea694746e0a4a452b2bc4d37"
let pk = "89446b900c70d62438dcf66756405eea6225ad94dc61f3856f62f9699111a9a6"
let nwc = WalletConnectURL(str: "nostrwalletconnect://\(pk)?relay=ws://127.0.0.1&secret=\(sec)&lud16=jb55@jb55.com")!
@@ -87,7 +88,7 @@ final class WalletConnectTests: XCTestCase {
let pool = RelayPool(ndb: .empty)
let box = PostBox(pool: pool)
WalletConnect.pay(url: nwc, pool: pool, post: box, invoice: "invoice", zap_request: nil)
await WalletConnect.pay(url: nwc, pool: pool, post: box, invoice: "invoice", zap_request: nil)
XCTAssertEqual(pool.our_descriptors.count, 0)
XCTAssertEqual(pool.all_descriptors.count, 1)