|
| 1 | +diff --git a/node_modules/react-native-mymonero-core/android/src/main/cpp/jni.cpp b/node_modules/react-native-mymonero-core/android/src/main/cpp/jni.cpp |
| 2 | +index dc077d2..ff55588 100644 |
| 3 | +--- a/node_modules/react-native-mymonero-core/android/src/main/cpp/jni.cpp |
| 4 | ++++ b/node_modules/react-native-mymonero-core/android/src/main/cpp/jni.cpp |
| 5 | +@@ -23,7 +23,7 @@ Java_app_edge_reactnative_mymonerocore_MyMoneroModule_callMyMoneroJNI( |
| 6 | + |
| 7 | + // Re-package the arguments: |
| 8 | + jsize length = env->GetArrayLength(arguments); |
| 9 | +- std::vector<const std::string> strings; |
| 10 | ++ std::vector<std::string> strings; |
| 11 | + strings.reserve(length); |
| 12 | + for (jsize i = 0; i < length; ++i) { |
| 13 | + jstring string = (jstring)env->GetObjectArrayElement(arguments, i); |
| 14 | +diff --git a/node_modules/react-native-mymonero-core/android/src/main/cpp/mymonero-wrapper/mymonero-methods.cpp b/node_modules/react-native-mymonero-core/android/src/main/cpp/mymonero-wrapper/mymonero-methods.cpp |
| 15 | +index 7d2f4e0..1a09b06 100644 |
| 16 | +--- a/node_modules/react-native-mymonero-core/android/src/main/cpp/mymonero-wrapper/mymonero-methods.cpp |
| 17 | ++++ b/node_modules/react-native-mymonero-core/android/src/main/cpp/mymonero-wrapper/mymonero-methods.cpp |
| 18 | +@@ -2,27 +2,27 @@ |
| 19 | + #include "../mymonero-core-cpp/src/serial_bridge_index.hpp" |
| 20 | + #include "../mymonero-utils/packages/mymonero-monero-client/src/emscr_SendFunds_bridge.hpp" |
| 21 | + |
| 22 | +-std::string addressAndKeysFromSeed(const std::vector<const std::string> &args) { |
| 23 | ++std::string addressAndKeysFromSeed(const std::vector<std::string> &args) { |
| 24 | + return serial_bridge::address_and_keys_from_seed(args[0], args[1]); |
| 25 | + } |
| 26 | + |
| 27 | +-std::string compareMnemonics(const std::vector<const std::string> &args) { |
| 28 | ++std::string compareMnemonics(const std::vector<std::string> &args) { |
| 29 | + return serial_bridge::are_equal_mnemonics(args[0], args[1]) ? "t" : ""; |
| 30 | + } |
| 31 | + |
| 32 | +-std::string createAndSignTx(const std::vector<const std::string> &args) { |
| 33 | ++std::string createAndSignTx(const std::vector<std::string> &args) { |
| 34 | + return emscr_SendFunds_bridge::send_funds(args[0]); |
| 35 | + } |
| 36 | + |
| 37 | +-std::string decodeAddress(const std::vector<const std::string> &args) { |
| 38 | ++std::string decodeAddress(const std::vector<std::string> &args) { |
| 39 | + return serial_bridge::decode_address(args[0], args[1]); |
| 40 | + } |
| 41 | + |
| 42 | +-std::string estimateTxFee(const std::vector<const std::string> &args) { |
| 43 | ++std::string estimateTxFee(const std::vector<std::string> &args) { |
| 44 | + return serial_bridge::estimated_tx_network_fee(args[0], args[1], args[2]); |
| 45 | + } |
| 46 | + |
| 47 | +-std::string generateKeyImage(const std::vector<const std::string> &args) { |
| 48 | ++std::string generateKeyImage(const std::vector<std::string> &args) { |
| 49 | + return serial_bridge::generate_key_image( |
| 50 | + args[0], |
| 51 | + args[1], |
| 52 | +@@ -32,23 +32,23 @@ std::string generateKeyImage(const std::vector<const std::string> &args) { |
| 53 | + ); |
| 54 | + } |
| 55 | + |
| 56 | +-std::string generatePaymentId(const std::vector<const std::string> &args) { |
| 57 | ++std::string generatePaymentId(const std::vector<std::string> &args) { |
| 58 | + return serial_bridge::new_payment_id(); |
| 59 | + } |
| 60 | + |
| 61 | +-std::string generateWallet(const std::vector<const std::string> &args) { |
| 62 | ++std::string generateWallet(const std::vector<std::string> &args) { |
| 63 | + return serial_bridge::newly_created_wallet(args[0], args[1]); |
| 64 | + } |
| 65 | + |
| 66 | +-std::string isIntegratedAddress(const std::vector<const std::string> &args) { |
| 67 | ++std::string isIntegratedAddress(const std::vector<std::string> &args) { |
| 68 | + return serial_bridge::is_integrated_address(args[0], args[1]) ? "t" : ""; |
| 69 | + } |
| 70 | + |
| 71 | +-std::string isSubaddress(const std::vector<const std::string> &args) { |
| 72 | ++std::string isSubaddress(const std::vector<std::string> &args) { |
| 73 | + return serial_bridge::is_subaddress(args[0], args[1]) ? "t" : ""; |
| 74 | + } |
| 75 | + |
| 76 | +-std::string isValidKeys(const std::vector<const std::string> &args) { |
| 77 | ++std::string isValidKeys(const std::vector<std::string> &args) { |
| 78 | + return serial_bridge::validate_components_for_login( |
| 79 | + args[0], |
| 80 | + args[1], |
| 81 | +@@ -58,19 +58,19 @@ std::string isValidKeys(const std::vector<const std::string> &args) { |
| 82 | + ); |
| 83 | + } |
| 84 | + |
| 85 | +-std::string mnemonicFromSeed(const std::vector<const std::string> &args) { |
| 86 | ++std::string mnemonicFromSeed(const std::vector<std::string> &args) { |
| 87 | + return serial_bridge::mnemonic_from_seed(args[0], args[1]); |
| 88 | + } |
| 89 | + |
| 90 | +-std::string newIntegratedAddress(const std::vector<const std::string> &args) { |
| 91 | ++std::string newIntegratedAddress(const std::vector<std::string> &args) { |
| 92 | + return serial_bridge::new_integrated_address(args[0], args[1], args[2]); |
| 93 | + } |
| 94 | + |
| 95 | +-std::string prepareTx(const std::vector<const std::string> &args) { |
| 96 | ++std::string prepareTx(const std::vector<std::string> &args) { |
| 97 | + return emscr_SendFunds_bridge::prepare_send(args[0]); |
| 98 | + } |
| 99 | + |
| 100 | +-std::string seedAndKeysFromMnemonic(const std::vector<const std::string> &args) { |
| 101 | ++std::string seedAndKeysFromMnemonic(const std::vector<std::string> &args) { |
| 102 | + return serial_bridge::seed_and_keys_from_mnemonic(args[0], args[1]); |
| 103 | + } |
| 104 | + |
| 105 | +diff --git a/node_modules/react-native-mymonero-core/android/src/main/cpp/mymonero-wrapper/mymonero-methods.hpp b/node_modules/react-native-mymonero-core/android/src/main/cpp/mymonero-wrapper/mymonero-methods.hpp |
| 106 | +index bfedec1..c287d3b 100644 |
| 107 | +--- a/node_modules/react-native-mymonero-core/android/src/main/cpp/mymonero-wrapper/mymonero-methods.hpp |
| 108 | ++++ b/node_modules/react-native-mymonero-core/android/src/main/cpp/mymonero-wrapper/mymonero-methods.hpp |
| 109 | +@@ -7,7 +7,7 @@ |
| 110 | + struct MyMoneroMethod { |
| 111 | + const char *name; |
| 112 | + int argc; |
| 113 | +- std::string (*method)(const std::vector<const std::string> &args); |
| 114 | ++ std::string (*method)(const std::vector<std::string> &args); |
| 115 | + }; |
| 116 | + extern const MyMoneroMethod myMoneroMethods[]; |
| 117 | + extern const unsigned myMoneroMethodCount; |
| 118 | +diff --git a/node_modules/react-native-mymonero-core/ios/MyMoneroCore.mm b/node_modules/react-native-mymonero-core/ios/MyMoneroCore.mm |
| 119 | +index 2eba1a5..97c84e8 100644 |
| 120 | +--- a/node_modules/react-native-mymonero-core/ios/MyMoneroCore.mm |
| 121 | ++++ b/node_modules/react-native-mymonero-core/ios/MyMoneroCore.mm |
| 122 | +@@ -18,7 +18,7 @@ RCT_REMAP_METHOD( |
| 123 | + |
| 124 | + // Re-package the arguments: |
| 125 | + NSUInteger length = [arguments count]; |
| 126 | +- std::vector<const std::string> strings; |
| 127 | ++ std::vector<std::string> strings; |
| 128 | + strings.reserve(length); |
| 129 | + for (NSUInteger i = 0; i < length; ++i) { |
| 130 | + NSString *string = [arguments objectAtIndex:i]; |
| 131 | +diff --git a/node_modules/react-native-mymonero-core/src/mymonero-wrapper/mymonero-methods.cpp b/node_modules/react-native-mymonero-core/src/mymonero-wrapper/mymonero-methods.cpp |
| 132 | +index 7d2f4e0..1a09b06 100644 |
| 133 | +--- a/node_modules/react-native-mymonero-core/src/mymonero-wrapper/mymonero-methods.cpp |
| 134 | ++++ b/node_modules/react-native-mymonero-core/src/mymonero-wrapper/mymonero-methods.cpp |
| 135 | +@@ -2,27 +2,27 @@ |
| 136 | + #include "../mymonero-core-cpp/src/serial_bridge_index.hpp" |
| 137 | + #include "../mymonero-utils/packages/mymonero-monero-client/src/emscr_SendFunds_bridge.hpp" |
| 138 | + |
| 139 | +-std::string addressAndKeysFromSeed(const std::vector<const std::string> &args) { |
| 140 | ++std::string addressAndKeysFromSeed(const std::vector<std::string> &args) { |
| 141 | + return serial_bridge::address_and_keys_from_seed(args[0], args[1]); |
| 142 | + } |
| 143 | + |
| 144 | +-std::string compareMnemonics(const std::vector<const std::string> &args) { |
| 145 | ++std::string compareMnemonics(const std::vector<std::string> &args) { |
| 146 | + return serial_bridge::are_equal_mnemonics(args[0], args[1]) ? "t" : ""; |
| 147 | + } |
| 148 | + |
| 149 | +-std::string createAndSignTx(const std::vector<const std::string> &args) { |
| 150 | ++std::string createAndSignTx(const std::vector<std::string> &args) { |
| 151 | + return emscr_SendFunds_bridge::send_funds(args[0]); |
| 152 | + } |
| 153 | + |
| 154 | +-std::string decodeAddress(const std::vector<const std::string> &args) { |
| 155 | ++std::string decodeAddress(const std::vector<std::string> &args) { |
| 156 | + return serial_bridge::decode_address(args[0], args[1]); |
| 157 | + } |
| 158 | + |
| 159 | +-std::string estimateTxFee(const std::vector<const std::string> &args) { |
| 160 | ++std::string estimateTxFee(const std::vector<std::string> &args) { |
| 161 | + return serial_bridge::estimated_tx_network_fee(args[0], args[1], args[2]); |
| 162 | + } |
| 163 | + |
| 164 | +-std::string generateKeyImage(const std::vector<const std::string> &args) { |
| 165 | ++std::string generateKeyImage(const std::vector<std::string> &args) { |
| 166 | + return serial_bridge::generate_key_image( |
| 167 | + args[0], |
| 168 | + args[1], |
| 169 | +@@ -32,23 +32,23 @@ std::string generateKeyImage(const std::vector<const std::string> &args) { |
| 170 | + ); |
| 171 | + } |
| 172 | + |
| 173 | +-std::string generatePaymentId(const std::vector<const std::string> &args) { |
| 174 | ++std::string generatePaymentId(const std::vector<std::string> &args) { |
| 175 | + return serial_bridge::new_payment_id(); |
| 176 | + } |
| 177 | + |
| 178 | +-std::string generateWallet(const std::vector<const std::string> &args) { |
| 179 | ++std::string generateWallet(const std::vector<std::string> &args) { |
| 180 | + return serial_bridge::newly_created_wallet(args[0], args[1]); |
| 181 | + } |
| 182 | + |
| 183 | +-std::string isIntegratedAddress(const std::vector<const std::string> &args) { |
| 184 | ++std::string isIntegratedAddress(const std::vector<std::string> &args) { |
| 185 | + return serial_bridge::is_integrated_address(args[0], args[1]) ? "t" : ""; |
| 186 | + } |
| 187 | + |
| 188 | +-std::string isSubaddress(const std::vector<const std::string> &args) { |
| 189 | ++std::string isSubaddress(const std::vector<std::string> &args) { |
| 190 | + return serial_bridge::is_subaddress(args[0], args[1]) ? "t" : ""; |
| 191 | + } |
| 192 | + |
| 193 | +-std::string isValidKeys(const std::vector<const std::string> &args) { |
| 194 | ++std::string isValidKeys(const std::vector<std::string> &args) { |
| 195 | + return serial_bridge::validate_components_for_login( |
| 196 | + args[0], |
| 197 | + args[1], |
| 198 | +@@ -58,19 +58,19 @@ std::string isValidKeys(const std::vector<const std::string> &args) { |
| 199 | + ); |
| 200 | + } |
| 201 | + |
| 202 | +-std::string mnemonicFromSeed(const std::vector<const std::string> &args) { |
| 203 | ++std::string mnemonicFromSeed(const std::vector<std::string> &args) { |
| 204 | + return serial_bridge::mnemonic_from_seed(args[0], args[1]); |
| 205 | + } |
| 206 | + |
| 207 | +-std::string newIntegratedAddress(const std::vector<const std::string> &args) { |
| 208 | ++std::string newIntegratedAddress(const std::vector<std::string> &args) { |
| 209 | + return serial_bridge::new_integrated_address(args[0], args[1], args[2]); |
| 210 | + } |
| 211 | + |
| 212 | +-std::string prepareTx(const std::vector<const std::string> &args) { |
| 213 | ++std::string prepareTx(const std::vector<std::string> &args) { |
| 214 | + return emscr_SendFunds_bridge::prepare_send(args[0]); |
| 215 | + } |
| 216 | + |
| 217 | +-std::string seedAndKeysFromMnemonic(const std::vector<const std::string> &args) { |
| 218 | ++std::string seedAndKeysFromMnemonic(const std::vector<std::string> &args) { |
| 219 | + return serial_bridge::seed_and_keys_from_mnemonic(args[0], args[1]); |
| 220 | + } |
| 221 | + |
| 222 | +diff --git a/node_modules/react-native-mymonero-core/src/mymonero-wrapper/mymonero-methods.hpp b/node_modules/react-native-mymonero-core/src/mymonero-wrapper/mymonero-methods.hpp |
| 223 | +index bfedec1..c287d3b 100644 |
| 224 | +--- a/node_modules/react-native-mymonero-core/src/mymonero-wrapper/mymonero-methods.hpp |
| 225 | ++++ b/node_modules/react-native-mymonero-core/src/mymonero-wrapper/mymonero-methods.hpp |
| 226 | +@@ -7,7 +7,7 @@ |
| 227 | + struct MyMoneroMethod { |
| 228 | + const char *name; |
| 229 | + int argc; |
| 230 | +- std::string (*method)(const std::vector<const std::string> &args); |
| 231 | ++ std::string (*method)(const std::vector<std::string> &args); |
| 232 | + }; |
| 233 | + extern const MyMoneroMethod myMoneroMethods[]; |
| 234 | + extern const unsigned myMoneroMethodCount; |
0 commit comments