From a78e5a9c7039ecc86e2b780daf029bdf9c049188 Mon Sep 17 00:00:00 2001 From: feruz Date: Fri, 2 Apr 2021 13:52:00 +0300 Subject: [PATCH 1/6] hivesigner package fix --- ios/Ecency.xcodeproj/project.pbxproj | 40 ++++++++++++++++++++++++++++ ios/Podfile.lock | 2 +- package.json | 2 +- src/providers/hive/dhive.js | 22 +++++++-------- src/providers/hive/hivesignerAPI.js | 4 +-- yarn.lock | 16 ++++++++--- 6 files changed, 67 insertions(+), 19 deletions(-) diff --git a/ios/Ecency.xcodeproj/project.pbxproj b/ios/Ecency.xcodeproj/project.pbxproj index f9edbd2f0..12df94b79 100644 --- a/ios/Ecency.xcodeproj/project.pbxproj +++ b/ios/Ecency.xcodeproj/project.pbxproj @@ -419,6 +419,7 @@ buildPhases = ( 34BCD4A0CB18D2BBEAB2C603 /* [CP] Check Pods Manifest.lock */, 05B6C48E24C306CE00B7FA60 /* Start Packager */, + C10A006FE20387B1DAB676EC /* [CP] Prepare Artifacts */, 05B6C48F24C306CE00B7FA60 /* Sources */, 05B6C49324C306CE00B7FA60 /* Frameworks */, 05B6C49624C306CE00B7FA60 /* Resources */, @@ -427,6 +428,7 @@ 05BAAAEE25BF43F80072EA01 /* ShellScript */, B5EF1EF3F231727CEA4D6618 /* [CP] Copy Pods Resources */, A83EF301E9E07454EBBAE295 /* [CP-User] [RNFB] Core Configuration */, + 3E3DF9F195ACB09DA64180E0 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -747,6 +749,23 @@ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; + 3E3DF9F195ACB09DA64180E0 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Ecency/Pods-Ecency-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/cocoapods-artifacts-${CONFIGURATION}.txt", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Ecency/Pods-Ecency-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; 57F4EECD4004FE3420E6DF92 /* Bundle React Native Code And Images */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -845,6 +864,27 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Ecency/Pods-Ecency-resources.sh\"\n"; showEnvVarsInLog = 0; }; + C10A006FE20387B1DAB676EC /* [CP] Prepare Artifacts */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Ecency/Pods-Ecency-artifacts.sh", + "${PODS_ROOT}/AppCenter/AppCenter-SDK-Apple/AppCenterAnalytics.xcframework", + "${PODS_ROOT}/AppCenter/AppCenter-SDK-Apple/AppCenter.xcframework", + "${PODS_ROOT}/AppCenter/AppCenter-SDK-Apple/AppCenterCrashes.xcframework", + "${PODS_ROOT}/AppCenterReactNativeShared/AppCenterReactNativeShared/AppCenterReactNativeShared.xcframework", + ); + name = "[CP] Prepare Artifacts"; + outputPaths = ( + "${BUILT_PRODUCTS_DIR}/cocoapods-artifacts-${CONFIGURATION}.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Ecency/Pods-Ecency-artifacts.sh\"\n"; + showEnvVarsInLog = 0; + }; FD10A7F122414F3F0027D42C /* Start Packager */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; diff --git a/ios/Podfile.lock b/ios/Podfile.lock index eed63661e..34d6c9957 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -726,4 +726,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: fe3729fa5bd9034637b0c0653446c2895b1c839d -COCOAPODS: 1.10.1 +COCOAPODS: 1.9.3 diff --git a/package.json b/package.json index bc8b6d0a1..04ee4f5ab 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,7 @@ "crypto-js": "^3.1.9-1", "currency-symbol-map": "^4.0.4", "diff-match-patch": "^1.0.4", - "hivesigner": "^3.2.1", + "hivesigner": "^3.2.6", "intl": "^1.2.5", "jsc-android": "^241213.1.0", "lodash": "^4.17.13", diff --git a/src/providers/hive/dhive.js b/src/providers/hive/dhive.js index e8930a7f0..3b879e337 100644 --- a/src/providers/hive/dhive.js +++ b/src/providers/hive/dhive.js @@ -5,7 +5,7 @@ import { Client, cryptoUtils, utils } from '@hiveio/dhive'; import { PrivateKey } from '@esteemapp/dhive'; -import hivesigner from 'hivesigner'; +import { Client as hsClient } from 'hivesigner'; import Config from 'react-native-config'; import { get, has } from 'lodash'; import { getServer, getCache, setCache } from '../../realm/realm'; @@ -397,7 +397,7 @@ export const ignoreUser = async (currentAccount, pin, data) => { if (currentAccount.local.authType === AUTH_TYPE.STEEM_CONNECT) { const token = decryptKey(currentAccount.local.accessToken, digitPinCode); - const api = new hivesigner.Client({ + const api = new hsClient({ accessToken: token, }); @@ -548,7 +548,7 @@ export const deleteComment = (currentAccount, pin, permlink) => { if (currentAccount.local.authType === AUTH_TYPE.STEEM_CONNECT) { const token = decryptKey(currentAccount.local.accessToken, digitPinCode); - const api = new hivesigner.Client({ + const api = new hsClient({ accessToken: token, }); @@ -661,7 +661,7 @@ const _vote = async (currentAccount, pin, author, permlink, weight) => { const key = getAnyPrivateKey(currentAccount.local, digitPinCode); if (currentAccount.local.authType === AUTH_TYPE.STEEM_CONNECT) { const token = decryptKey(currentAccount.local.accessToken, digitPinCode); - const api = new hivesigner.Client({ + const api = new hsClient({ accessToken: token, }); @@ -1053,7 +1053,7 @@ export const followUser = async (currentAccount, pin, data) => { if (currentAccount.local.authType === AUTH_TYPE.STEEM_CONNECT) { const token = decryptKey(get(currentAccount, 'local.accessToken'), digitPinCode); - const api = new hivesigner.Client({ + const api = new hsClient({ accessToken: token, }); @@ -1099,7 +1099,7 @@ export const unfollowUser = async (currentAccount, pin, data) => { if (currentAccount.local.authType === AUTH_TYPE.STEEM_CONNECT) { const token = decryptKey(currentAccount.local.accessToken, digitPinCode); - const api = new hivesigner.Client({ + const api = new hsClient({ accessToken: token, }); @@ -1215,7 +1215,7 @@ const _postContent = async ( if (account.local.authType === AUTH_TYPE.STEEM_CONNECT) { const token = decryptKey(account.local.accessToken, digitPinCode); - const api = new hivesigner.Client({ + const api = new hsClient({ accessToken: token, }); @@ -1322,7 +1322,7 @@ const _reblog = async (account, pinCode, author, permlink) => { if (account.local.authType === AUTH_TYPE.STEEM_CONNECT) { const token = decryptKey(account.local.accessToken, pin); - const api = new hivesigner.Client({ + const api = new hsClient({ accessToken: token, }); @@ -1363,7 +1363,7 @@ export const claimRewardBalance = (account, pinCode, rewardSteem, rewardSbd, rew if (account.local.authType === AUTH_TYPE.STEEM_CONNECT) { const token = decryptKey(get(account, 'local.accessToken'), pin); - const api = new hivesigner.Client({ + const api = new hsClient({ accessToken: token, }); @@ -1498,7 +1498,7 @@ export const grantPostingPermission = async (json, pin, currentAccount) => { newPosting.account_auths.sort(); if (get(currentAccount, 'local.authType') === AUTH_TYPE.STEEM_CONNECT) { const token = decryptKey(get(currentAccount, 'local.accessToken'), digitPinCode); - const api = new hivesigner.Client({ + const api = new hsClient({ accessToken: token, }); const _params = { @@ -1556,7 +1556,7 @@ export const profileUpdate = async (params, pin, currentAccount) => { if (get(currentAccount, 'local.authType') === AUTH_TYPE.STEEM_CONNECT) { const token = decryptKey(get(currentAccount, 'local.accessToken'), digitPinCode); - const api = new hivesigner.Client({ + const api = new hsClient({ accessToken: token, }); diff --git a/src/providers/hive/hivesignerAPI.js b/src/providers/hive/hivesignerAPI.js index b0a4b4c92..e77cae6ff 100644 --- a/src/providers/hive/hivesignerAPI.js +++ b/src/providers/hive/hivesignerAPI.js @@ -1,6 +1,6 @@ -import hivesigner from 'hivesigner'; +import { Client } from 'hivesigner'; -const api = new hivesigner.Client({ +const api = new Client({ app: 'ecency.app', callbackURL: 'http://127.0.0.1:3000/auth', }); diff --git a/yarn.lock b/yarn.lock index f379e9758..bc38515c8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -643,6 +643,13 @@ dependencies: regenerator-runtime "^0.13.4" +"@babel/runtime@^7.13.9": + version "7.13.10" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.13.10.tgz#47d42a57b6095f4468da440388fdbad8bebf0d7d" + integrity sha512-4QPkjJq6Ns3V/RgpEahRk+AGfL0eO6RHHtTWoNNr5mO49G6B5+X6d6THgWEAvTrznU5xYpbAlVKRYcsCgh/Akw== + dependencies: + regenerator-runtime "^0.13.4" + "@babel/template@^7.0.0", "@babel/template@^7.12.13", "@babel/template@^7.4.0": version "7.12.13" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.12.13.tgz#530265be8a2589dbb37523844c5bcb55947fb327" @@ -4352,11 +4359,12 @@ hive-uri@^0.2.3: resolved "https://registry.yarnpkg.com/hive-uri/-/hive-uri-0.2.3.tgz#a0d9bc69d44423e660c84dd57fdadb6994481b8d" integrity sha512-q6zp2sh5fjs6cf4T2oHvXt4IFNMmGBTRT5uKuxK/y//5XXCSbOGY/B/DKfK+7hwT8arMhcnbtKdlKarZu2SsXA== -hivesigner@^3.2.1: - version "3.2.4" - resolved "https://registry.yarnpkg.com/hivesigner/-/hivesigner-3.2.4.tgz#b08254e609f1aa270765c2e3e6821d961035e5dd" - integrity sha512-iGlFB8Ruse5KeyJrHMgzxhkp1vkP/ykcfPp0pNZIItyfn0y2bR1US7QF3UYCDXrdSIHRhKMVkgdp5SIG4Sp84g== +hivesigner@^3.2.6: + version "3.2.6" + resolved "https://registry.yarnpkg.com/hivesigner/-/hivesigner-3.2.6.tgz#86d71aa584862f301179c4544c5dd0d3abac68f6" + integrity sha512-7aomvKBKKURatLZZf2iifuiW+tK+CLvhEN6KQIBWsJcJDKVuoOtHSqE9ea0JGdUhlB2VGNmPP+wBPt3hpLkLsA== dependencies: + "@babel/runtime" "^7.13.9" cross-fetch "^3.0.6" hive-uri "^0.2.3" From fa554e040267420af97dbf2a473a2392ed201aa0 Mon Sep 17 00:00:00 2001 From: feruz Date: Sun, 4 Apr 2021 00:03:58 +0300 Subject: [PATCH 2/6] rename --- src/providers/hive/{hivesigner.js => hivesignerMethods.js} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/providers/hive/{hivesigner.js => hivesignerMethods.js} (100%) diff --git a/src/providers/hive/hivesigner.js b/src/providers/hive/hivesignerMethods.js similarity index 100% rename from src/providers/hive/hivesigner.js rename to src/providers/hive/hivesignerMethods.js From 9c31aad2d21b6aa072df525e706b7b4dbe61dee2 Mon Sep 17 00:00:00 2001 From: feruz Date: Sun, 4 Apr 2021 00:14:11 +0300 Subject: [PATCH 3/6] en clean --- src/config/locales/en-US.json | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/config/locales/en-US.json b/src/config/locales/en-US.json index e14686818..3e3392f25 100644 --- a/src/config/locales/en-US.json +++ b/src/config/locales/en-US.json @@ -335,8 +335,6 @@ "label_no_images":"No Images Found", "title":"Uploaded Images", "title_remove_confirmation":"Delete image", - "btn_save":"SAVE", - "btn_close":"CLOSE", "btn_add":"Image", "message_failed":"Failed to upload image", "message_remove_confirmation":"Are you sure you want to delete this image?", From 53aeacfa37ce3d02b3d5891d4b32f442b6bc938c Mon Sep 17 00:00:00 2001 From: feruz Date: Sun, 4 Apr 2021 00:15:03 +0300 Subject: [PATCH 4/6] en clean --- src/config/locales/en-US.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/config/locales/en-US.json b/src/config/locales/en-US.json index 3e3392f25..93dc61248 100644 --- a/src/config/locales/en-US.json +++ b/src/config/locales/en-US.json @@ -337,9 +337,7 @@ "title_remove_confirmation":"Delete image", "btn_add":"Image", "message_failed":"Failed to upload image", - "message_remove_confirmation":"Are you sure you want to delete this image?", - "btn_confirm":"Confirm", - "btn_cancel":"Cancel" + "message_remove_confirmation":"Are you sure you want to delete this image?" }, "pincode": { "enter_text": "Enter PIN to unlock", From c965eb7bff3fa7cbd6e567c615124277df671812 Mon Sep 17 00:00:00 2001 From: feruz Date: Sun, 4 Apr 2021 07:32:31 +0300 Subject: [PATCH 5/6] hs version downgrade --- package.json | 2 +- yarn.lock | 16 ++++------------ 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index 04ee4f5ab..c8c849a13 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,7 @@ "crypto-js": "^3.1.9-1", "currency-symbol-map": "^4.0.4", "diff-match-patch": "^1.0.4", - "hivesigner": "^3.2.6", + "hivesigner": "3.2.4", "intl": "^1.2.5", "jsc-android": "^241213.1.0", "lodash": "^4.17.13", diff --git a/yarn.lock b/yarn.lock index bc38515c8..3da2ab2f2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -643,13 +643,6 @@ dependencies: regenerator-runtime "^0.13.4" -"@babel/runtime@^7.13.9": - version "7.13.10" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.13.10.tgz#47d42a57b6095f4468da440388fdbad8bebf0d7d" - integrity sha512-4QPkjJq6Ns3V/RgpEahRk+AGfL0eO6RHHtTWoNNr5mO49G6B5+X6d6THgWEAvTrznU5xYpbAlVKRYcsCgh/Akw== - dependencies: - regenerator-runtime "^0.13.4" - "@babel/template@^7.0.0", "@babel/template@^7.12.13", "@babel/template@^7.4.0": version "7.12.13" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.12.13.tgz#530265be8a2589dbb37523844c5bcb55947fb327" @@ -4359,12 +4352,11 @@ hive-uri@^0.2.3: resolved "https://registry.yarnpkg.com/hive-uri/-/hive-uri-0.2.3.tgz#a0d9bc69d44423e660c84dd57fdadb6994481b8d" integrity sha512-q6zp2sh5fjs6cf4T2oHvXt4IFNMmGBTRT5uKuxK/y//5XXCSbOGY/B/DKfK+7hwT8arMhcnbtKdlKarZu2SsXA== -hivesigner@^3.2.6: - version "3.2.6" - resolved "https://registry.yarnpkg.com/hivesigner/-/hivesigner-3.2.6.tgz#86d71aa584862f301179c4544c5dd0d3abac68f6" - integrity sha512-7aomvKBKKURatLZZf2iifuiW+tK+CLvhEN6KQIBWsJcJDKVuoOtHSqE9ea0JGdUhlB2VGNmPP+wBPt3hpLkLsA== +hivesigner@3.2.4: + version "3.2.4" + resolved "https://registry.yarnpkg.com/hivesigner/-/hivesigner-3.2.4.tgz#b08254e609f1aa270765c2e3e6821d961035e5dd" + integrity sha512-iGlFB8Ruse5KeyJrHMgzxhkp1vkP/ykcfPp0pNZIItyfn0y2bR1US7QF3UYCDXrdSIHRhKMVkgdp5SIG4Sp84g== dependencies: - "@babel/runtime" "^7.13.9" cross-fetch "^3.0.6" hive-uri "^0.2.3" From ffa98c2ac9975d2e5283f53e064bcbe4f3576e48 Mon Sep 17 00:00:00 2001 From: feruz Date: Mon, 5 Apr 2021 09:31:47 +0300 Subject: [PATCH 6/6] hivesigner bump --- package.json | 2 +- yarn.lock | 16 ++++++++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index c8c849a13..178336c10 100644 --- a/package.json +++ b/package.json @@ -55,7 +55,7 @@ "crypto-js": "^3.1.9-1", "currency-symbol-map": "^4.0.4", "diff-match-patch": "^1.0.4", - "hivesigner": "3.2.4", + "hivesigner": "^3.2.7", "intl": "^1.2.5", "jsc-android": "^241213.1.0", "lodash": "^4.17.13", diff --git a/yarn.lock b/yarn.lock index 3da2ab2f2..7cd19636a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -643,6 +643,13 @@ dependencies: regenerator-runtime "^0.13.4" +"@babel/runtime@^7.13.9": + version "7.13.10" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.13.10.tgz#47d42a57b6095f4468da440388fdbad8bebf0d7d" + integrity sha512-4QPkjJq6Ns3V/RgpEahRk+AGfL0eO6RHHtTWoNNr5mO49G6B5+X6d6THgWEAvTrznU5xYpbAlVKRYcsCgh/Akw== + dependencies: + regenerator-runtime "^0.13.4" + "@babel/template@^7.0.0", "@babel/template@^7.12.13", "@babel/template@^7.4.0": version "7.12.13" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.12.13.tgz#530265be8a2589dbb37523844c5bcb55947fb327" @@ -4352,11 +4359,12 @@ hive-uri@^0.2.3: resolved "https://registry.yarnpkg.com/hive-uri/-/hive-uri-0.2.3.tgz#a0d9bc69d44423e660c84dd57fdadb6994481b8d" integrity sha512-q6zp2sh5fjs6cf4T2oHvXt4IFNMmGBTRT5uKuxK/y//5XXCSbOGY/B/DKfK+7hwT8arMhcnbtKdlKarZu2SsXA== -hivesigner@3.2.4: - version "3.2.4" - resolved "https://registry.yarnpkg.com/hivesigner/-/hivesigner-3.2.4.tgz#b08254e609f1aa270765c2e3e6821d961035e5dd" - integrity sha512-iGlFB8Ruse5KeyJrHMgzxhkp1vkP/ykcfPp0pNZIItyfn0y2bR1US7QF3UYCDXrdSIHRhKMVkgdp5SIG4Sp84g== +hivesigner@^3.2.7: + version "3.2.7" + resolved "https://registry.yarnpkg.com/hivesigner/-/hivesigner-3.2.7.tgz#a11ebb08b704e12422b36fda301a8c2cc78571ea" + integrity sha512-jzohlNW0bDakLDP7eNqMtzw/5LU1GxYpZM8+H5XZ+Sp1c4eQIR6H076GpH/scgcmTeYdoWJ08vly/fwBOEZcbA== dependencies: + "@babel/runtime" "^7.13.9" cross-fetch "^3.0.6" hive-uri "^0.2.3"