Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 2 additions & 4 deletions .github/workflows/create-cache-key.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,8 @@ jobs:
run: rustup default stable

- name: Store Cargo version
working-directory: rust
run: echo $(cargo --version) >> cargo_version.txt
run: echo $(cargo --version) >> rust/cargo_version.txt

- name: Create cache key
working-directory: rust
id: create-cache-key
run: echo "cache-key=${{ hashFiles('Cargo.lock', 'cargo_version.txt') }}" >> $GITHUB_OUTPUT
run: echo "cache-key=${{ hashFiles('rust/**/Cargo.toml', 'rust/**/Cargo.lock', 'rust/**/*.rs', 'rust/cargo_version.txt') }}" >> $GITHUB_OUTPUT
Original file line number Diff line number Diff line change
Expand Up @@ -1043,27 +1043,6 @@ class RPCModule internal constructor(private val reactContext: ReactApplicationC
}
}

@ReactMethod
fun resendTransactionProcess(txid: String, promise: Promise) {
CoroutineScope(Dispatchers.IO).launch {
try {
uniffi.zingo.initLogging()
val resp = uniffi.zingo.resendTransaction(txid)

withContext(Dispatchers.Main) {
promise.resolve(resp)
}
} catch (e: Exception) {
val errorMessage = "Error: [Native] resend transaction: ${e.localizedMessage}"
Log.e("MAIN", errorMessage, e)

withContext(Dispatchers.Main) {
promise.resolve(errorMessage)
}
}
}
}

@ReactMethod
fun removeTransactionProcess(txid: String, promise: Promise) {
CoroutineScope(Dispatchers.IO).launch {
Expand Down
37 changes: 0 additions & 37 deletions ios/RPCModule.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1284,43 +1284,6 @@ func fnGetBalanceInfo(_ dict: [AnyHashable: Any]) {
}
}

func fnResendTransactionProcess(_ dict: [AnyHashable: Any]) {
if let txid = dict["txid"] as? String,
let resolve = dict["resolve"] as? RCTPromiseResolveBlock {
do {
let resp = try resendTransaction(txid: txid)
let respStr = String(resp)
DispatchQueue.main.async {
resolve(respStr)
}
} catch {
let err = "Error: [Native] resend transaction. \(error.localizedDescription)"
NSLog(err)
DispatchQueue.main.async {
resolve(err)
}
}
} else {
let err = "Error: [Native] resend transaction. Command arguments problem."
NSLog(err)
if let resolve = dict["resolve"] as? RCTPromiseResolveBlock {
DispatchQueue.main.async {
resolve(err)
}
}
}
}

@objc(resendTransactionProcess:resolve:reject:)
func resendTransactionProcess(_ txid: String, resolve: @escaping RCTPromiseResolveBlock, reject: @escaping RCTPromiseRejectBlock) {
let dict: [String: Any] = ["txid": txid, "resolve": resolve]
DispatchQueue.global(qos: .userInitiated).async { [weak self] in
if let self = self {
self.fnResendTransactionProcess(dict)
}
}
}

func fnRemoveTransactionProcess(_ dict: [AnyHashable: Any]) {
if let txid = dict["txid"] as? String,
let resolve = dict["resolve"] as? RCTPromiseResolveBlock {
Expand Down
4 changes: 0 additions & 4 deletions ios/RPCModuleBridge.m
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,6 @@ @interface RCT_EXTERN_MODULE(RPCModule, NSObject)
(NSString)tor
resolve:(RCTPromiseResolveBlock)resolve
reject:(RCTPromiseRejectBlock)reject)
RCT_EXTERN_METHOD(resendTransactionProcess:
(NSString)txid
resolve:(RCTPromiseResolveBlock)resolve
reject:(RCTPromiseRejectBlock)reject)
RCT_EXTERN_METHOD(removeTransactionProcess:
(NSString)txid
resolve:(RCTPromiseResolveBlock)resolve
Expand Down
30 changes: 22 additions & 8 deletions ios/ZingoDelegator.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
53B35B50EB3644BA29BB1977 /* libPods-ZingoDelegator.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DE553D01850B9A7D0A318E6D /* libPods-ZingoDelegator.a */; };
636F67D21F11DB913699C327 /* libPods-ZingoDelegator-ZingoDelegatorTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 27E949F1F804CCF45A946383 /* libPods-ZingoDelegator-ZingoDelegatorTests.a */; };
81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; };
98FA38B42F735F5100BBEC14 /* libsqlite3.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 98FA38B32F735F5100BBEC14 /* libsqlite3.tbd */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -64,6 +65,7 @@
39E97A7F0D7A6F53E0420A62 /* Pods-ZingoDelegator-ZingoDelegatorTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ZingoDelegator-ZingoDelegatorTests.debug.xcconfig"; path = "Target Support Files/Pods-ZingoDelegator-ZingoDelegatorTests/Pods-ZingoDelegator-ZingoDelegatorTests.debug.xcconfig"; sourceTree = "<group>"; };
3F97CFA263BEEE053ABE8337 /* Pods-ZingoDelegator.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ZingoDelegator.release.xcconfig"; path = "Target Support Files/Pods-ZingoDelegator/Pods-ZingoDelegator.release.xcconfig"; sourceTree = "<group>"; };
81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = ZingoDelegator/LaunchScreen.storyboard; sourceTree = "<group>"; };
98FA38B32F735F5100BBEC14 /* libsqlite3.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libsqlite3.tbd; path = usr/lib/libsqlite3.tbd; sourceTree = SDKROOT; };
DE553D01850B9A7D0A318E6D /* libPods-ZingoDelegator.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-ZingoDelegator.a"; sourceTree = BUILT_PRODUCTS_DIR; };
E23A5F91E7AF3121B1C28726 /* Pods-ZingoDelegator.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ZingoDelegator.debug.xcconfig"; path = "Target Support Files/Pods-ZingoDelegator/Pods-ZingoDelegator.debug.xcconfig"; sourceTree = "<group>"; };
E2956C7E9A66C701169F867A /* Pods-ZingoDelegator-ZingoDelegatorTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ZingoDelegator-ZingoDelegatorTests.release.xcconfig"; path = "Target Support Files/Pods-ZingoDelegator-ZingoDelegatorTests/Pods-ZingoDelegator-ZingoDelegatorTests.release.xcconfig"; sourceTree = "<group>"; };
Expand All @@ -85,6 +87,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
98FA38B42F735F5100BBEC14 /* libsqlite3.tbd in Frameworks */,
1FE8E9AC296B85FC004A256B /* BackgroundTasks.framework in Frameworks */,
1F7D321D2B71D44800D2879C /* SystemConfiguration.framework in Frameworks */,
1F8815602BD31176006490E1 /* libzingo.a in Frameworks */,
Expand Down Expand Up @@ -132,6 +135,7 @@
2D16E6871FA4F8E400B85C8A /* Frameworks */ = {
isa = PBXGroup;
children = (
98FA38B32F735F5100BBEC14 /* libsqlite3.tbd */,
1F5E67792BD30CD1007B17AA /* libzingo.a */,
1F7D321C2B71D44800D2879C /* SystemConfiguration.framework */,
1FE8E9AB296B85FC004A256B /* BackgroundTasks.framework */,
Expand Down Expand Up @@ -332,10 +336,14 @@
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-ZingoDelegator/Pods-ZingoDelegator-resources-${CONFIGURATION}-input-files.xcfilelist",
);
inputPaths = (
);
name = "[CP] Copy Pods Resources";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-ZingoDelegator/Pods-ZingoDelegator-resources-${CONFIGURATION}-output-files.xcfilelist",
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ZingoDelegator/Pods-ZingoDelegator-resources.sh\"\n";
Expand Down Expand Up @@ -371,10 +379,14 @@
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-ZingoDelegator/Pods-ZingoDelegator-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
inputPaths = (
);
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-ZingoDelegator/Pods-ZingoDelegator-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ZingoDelegator/Pods-ZingoDelegator-frameworks.sh\"\n";
Expand All @@ -388,10 +400,14 @@
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-ZingoDelegator-ZingoDelegatorTests/Pods-ZingoDelegator-ZingoDelegatorTests-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
inputPaths = (
);
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-ZingoDelegator-ZingoDelegatorTests/Pods-ZingoDelegator-ZingoDelegatorTests-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ZingoDelegator-ZingoDelegatorTests/Pods-ZingoDelegator-ZingoDelegatorTests-frameworks.sh\"\n";
Expand All @@ -405,10 +421,14 @@
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-ZingoDelegator-ZingoDelegatorTests/Pods-ZingoDelegator-ZingoDelegatorTests-resources-${CONFIGURATION}-input-files.xcfilelist",
);
inputPaths = (
);
name = "[CP] Copy Pods Resources";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-ZingoDelegator-ZingoDelegatorTests/Pods-ZingoDelegator-ZingoDelegatorTests-resources-${CONFIGURATION}-output-files.xcfilelist",
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ZingoDelegator-ZingoDelegatorTests/Pods-ZingoDelegator-ZingoDelegatorTests-resources.sh\"\n";
Expand Down Expand Up @@ -713,10 +733,7 @@
ONLY_ACTIVE_ARCH = YES;
OTHER_CFLAGS = "$(inherited)";
OTHER_CPLUSPLUSFLAGS = "$(inherited)";
OTHER_LDFLAGS = (
"$(inherited)",
" ",
);
OTHER_LDFLAGS = "$(inherited) ";
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) DEBUG";
Expand Down Expand Up @@ -788,10 +805,7 @@
MTL_ENABLE_DEBUG_INFO = NO;
OTHER_CFLAGS = "$(inherited)";
OTHER_CPLUSPLUSFLAGS = "$(inherited)";
OTHER_LDFLAGS = (
"$(inherited)",
" ",
);
OTHER_LDFLAGS = "$(inherited) ";
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
SWIFT_COMPILATION_MODE = wholemodule;
Expand Down
Loading
Loading