From 54135046b7be924da52d8f3a101afc312dfe4b8d Mon Sep 17 00:00:00 2001 From: JJ Adonis Date: Wed, 19 Jul 2023 17:27:23 +0800 Subject: [PATCH] feature(ops): update send (#34) --- packages/sado-connect/package.json | 2 +- packages/sado-connect/src/hooks/useSend.tsx | 2 - pnpm-lock.yaml | 87 ++++++++++++--------- 3 files changed, 51 insertions(+), 40 deletions(-) diff --git a/packages/sado-connect/package.json b/packages/sado-connect/package.json index 89668c96..47701054 100644 --- a/packages/sado-connect/package.json +++ b/packages/sado-connect/package.json @@ -58,7 +58,7 @@ "@esbuild-plugins/node-globals-polyfill": "^0.2.3", "@esbuild-plugins/node-modules-polyfill": "^0.2.2", "@headlessui/react": "^1.7.15", - "@sadoprotocol/ordit-sdk": "^0.0.13", + "@sadoprotocol/ordit-sdk": "^0.0.16", "bitcoinjs-lib": "^6.1.3", "boring-avatars": "^1.10.1" } diff --git a/packages/sado-connect/src/hooks/useSend.tsx b/packages/sado-connect/src/hooks/useSend.tsx index e9eb5e47..eb9871cc 100644 --- a/packages/sado-connect/src/hooks/useSend.tsx +++ b/packages/sado-connect/src/hooks/useSend.tsx @@ -30,8 +30,6 @@ export function useSend(): [SendFunction, string | null] { if (!address || !publicKey) throw new Error("No wallet is connected"); const psbtTemplate: CreatePsbtOptions = { - // Use master node by default (BIP32 HD Wallet) - path: "", format: getAddressType(address, network), network, pubKey: publicKey, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f35bd675..ed121d21 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -29,8 +29,8 @@ importers: specifier: ^1.7.15 version: 1.7.15(react-dom@18.2.0)(react@18.2.0) "@sadoprotocol/ordit-sdk": - specifier: ^0.0.13 - version: 0.0.13 + specifier: ^0.0.16 + version: 0.0.16 bitcoinjs-lib: specifier: ^6.1.3 version: 6.1.3 @@ -774,10 +774,10 @@ packages: string-argv: 0.3.2 dev: true - /@sadoprotocol/ordit-sdk@0.0.13: + /@sadoprotocol/ordit-sdk@0.0.16: resolution: { - integrity: sha512-q5FSlDoHAGYz396xumWvkrd4nqWD2gFjNGSQf524W+8HccHNLyRWy3Mg4sN+2sMaJQYUvcoUFjBzjeevGIUoCA==, + integrity: sha512-iARa05DBo6SQJvkCcWMRn0jJkn2wKplqW7zJ3z2c7RcbI+NN3W2xPh6YPCQvhBzPaoiOoftvSwJ7piaW/+QRQA==, } dependencies: "@bitcoinerlab/secp256k1": 1.0.2 @@ -1119,7 +1119,7 @@ packages: - supports-color dev: true - /@typescript-eslint/eslint-plugin@5.59.0(@typescript-eslint/parser@5.59.0)(eslint@8.38.0)(typescript@5.0.4): + /@typescript-eslint/eslint-plugin@5.59.0(@typescript-eslint/parser@5.59.0)(eslint@8.45.0)(typescript@5.0.4): resolution: { integrity: sha512-p0QgrEyrxAWBecR56gyn3wkG15TJdI//eetInP3zYRewDh0XS+DhB3VUAd3QqvziFsfaQIoIuZMxZRB7vXYaYw==, @@ -1134,12 +1134,12 @@ packages: optional: true dependencies: "@eslint-community/regexpp": 4.5.1 - "@typescript-eslint/parser": 5.59.0(eslint@8.38.0)(typescript@5.0.4) + "@typescript-eslint/parser": 5.59.0(eslint@8.45.0)(typescript@5.0.4) "@typescript-eslint/scope-manager": 5.59.0 - "@typescript-eslint/type-utils": 5.59.0(eslint@8.38.0)(typescript@5.0.4) - "@typescript-eslint/utils": 5.59.0(eslint@8.38.0)(typescript@5.0.4) + "@typescript-eslint/type-utils": 5.59.0(eslint@8.45.0)(typescript@5.0.4) + "@typescript-eslint/utils": 5.59.0(eslint@8.45.0)(typescript@5.0.4) debug: 4.3.4 - eslint: 8.38.0 + eslint: 8.45.0 grapheme-splitter: 1.0.4 ignore: 5.2.4 natural-compare-lite: 1.4.0 @@ -1173,7 +1173,7 @@ packages: - supports-color dev: true - /@typescript-eslint/parser@5.59.0(eslint@8.38.0)(typescript@5.0.4): + /@typescript-eslint/parser@5.59.0(eslint@8.45.0)(typescript@5.0.4): resolution: { integrity: sha512-qK9TZ70eJtjojSUMrrEwA9ZDQ4N0e/AuoOIgXuNBorXYcBDk397D2r5MIe1B3cok/oCtdNC5j+lUUpVB+Dpb+w==, @@ -1190,7 +1190,7 @@ packages: "@typescript-eslint/types": 5.59.0 "@typescript-eslint/typescript-estree": 5.59.0(typescript@5.0.4) debug: 4.3.4 - eslint: 8.38.0 + eslint: 8.45.0 typescript: 5.0.4 transitivePeerDependencies: - supports-color @@ -1230,7 +1230,7 @@ packages: - supports-color dev: true - /@typescript-eslint/type-utils@5.59.0(eslint@8.38.0)(typescript@5.0.4): + /@typescript-eslint/type-utils@5.59.0(eslint@8.45.0)(typescript@5.0.4): resolution: { integrity: sha512-d/B6VSWnZwu70kcKQSCqjcXpVH+7ABKH8P1KNn4K7j5PXXuycZTPXF44Nui0TEm6rbWGi8kc78xRgOC4n7xFgA==, @@ -1244,9 +1244,9 @@ packages: optional: true dependencies: "@typescript-eslint/typescript-estree": 5.59.0(typescript@5.0.4) - "@typescript-eslint/utils": 5.59.0(eslint@8.38.0)(typescript@5.0.4) + "@typescript-eslint/utils": 5.59.0(eslint@8.45.0)(typescript@5.0.4) debug: 4.3.4 - eslint: 8.38.0 + eslint: 8.45.0 tsutils: 3.21.0(typescript@5.0.4) typescript: 5.0.4 transitivePeerDependencies: @@ -1332,7 +1332,7 @@ packages: - typescript dev: true - /@typescript-eslint/utils@5.59.0(eslint@8.38.0)(typescript@5.0.4): + /@typescript-eslint/utils@5.59.0(eslint@8.45.0)(typescript@5.0.4): resolution: { integrity: sha512-GGLFd+86drlHSvPgN/el6dRQNYYGOvRSDVydsUaQluwIW3HvbXuxyuD5JETvBt/9qGYe+lOrDk6gRrWOHb/FvA==, @@ -1341,13 +1341,13 @@ packages: peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: - "@eslint-community/eslint-utils": 4.4.0(eslint@8.38.0) + "@eslint-community/eslint-utils": 4.4.0(eslint@8.45.0) "@types/json-schema": 7.0.12 "@types/semver": 7.5.0 "@typescript-eslint/scope-manager": 5.59.0 "@typescript-eslint/types": 5.59.0 "@typescript-eslint/typescript-estree": 5.59.0(typescript@5.0.4) - eslint: 8.38.0 + eslint: 8.45.0 eslint-scope: 5.1.1 semver: 7.5.2 transitivePeerDependencies: @@ -2500,7 +2500,7 @@ packages: dependencies: confusing-browser-globals: 1.0.11 eslint: 8.45.0 - eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.59.0)(eslint@8.38.0) + eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.59.0)(eslint@8.45.0) object.assign: 4.1.4 object.entries: 1.1.6 semver: 6.3.1 @@ -2517,11 +2517,11 @@ packages: eslint: ^7.32.0 || ^8.2.0 eslint-plugin-import: ^2.25.3 dependencies: - "@typescript-eslint/eslint-plugin": 5.59.0(@typescript-eslint/parser@5.59.0)(eslint@8.38.0)(typescript@5.0.4) - "@typescript-eslint/parser": 5.59.0(eslint@8.38.0)(typescript@5.0.4) + "@typescript-eslint/eslint-plugin": 5.59.0(@typescript-eslint/parser@5.59.0)(eslint@8.45.0)(typescript@5.0.4) + "@typescript-eslint/parser": 5.59.0(eslint@8.45.0)(typescript@5.0.4) eslint: 8.45.0 eslint-config-airbnb-base: 15.0.0(eslint-plugin-import@2.27.5)(eslint@8.45.0) - eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.59.0)(eslint@8.38.0) + eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.59.0)(eslint@8.45.0) dev: true /eslint-config-airbnb@19.0.4(eslint-plugin-import@2.27.5)(eslint-plugin-jsx-a11y@6.7.1)(eslint-plugin-react-hooks@4.6.0)(eslint-plugin-react@7.32.2)(eslint@8.45.0): @@ -2539,10 +2539,10 @@ packages: dependencies: eslint: 8.45.0 eslint-config-airbnb-base: 15.0.0(eslint-plugin-import@2.27.5)(eslint@8.45.0) - eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.59.0)(eslint@8.38.0) - eslint-plugin-jsx-a11y: 6.7.1(eslint@8.38.0) - eslint-plugin-react: 7.32.2(eslint@8.38.0) - eslint-plugin-react-hooks: 4.6.0(eslint@8.38.0) + eslint-plugin-import: 2.27.5(@typescript-eslint/parser@5.59.0)(eslint@8.45.0) + eslint-plugin-jsx-a11y: 6.7.1(eslint@8.45.0) + eslint-plugin-react: 7.32.2(eslint@8.45.0) + eslint-plugin-react-hooks: 4.6.0(eslint@8.45.0) object.assign: 4.1.4 object.entries: 1.1.6 dev: true @@ -2572,7 +2572,7 @@ packages: - supports-color dev: true - /eslint-module-utils@2.8.0(@typescript-eslint/parser@5.59.0)(eslint-import-resolver-node@0.3.7)(eslint@8.38.0): + /eslint-module-utils@2.8.0(@typescript-eslint/parser@5.59.0)(eslint-import-resolver-node@0.3.7)(eslint@8.45.0): resolution: { integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==, @@ -2596,15 +2596,15 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - "@typescript-eslint/parser": 5.59.0(eslint@8.38.0)(typescript@5.0.4) + "@typescript-eslint/parser": 5.59.0(eslint@8.45.0)(typescript@5.0.4) debug: 3.2.7 - eslint: 8.38.0 + eslint: 8.45.0 eslint-import-resolver-node: 0.3.7 transitivePeerDependencies: - supports-color dev: true - /eslint-plugin-import@2.27.5(@typescript-eslint/parser@5.59.0)(eslint@8.38.0): + /eslint-plugin-import@2.27.5(@typescript-eslint/parser@5.59.0)(eslint@8.45.0): resolution: { integrity: sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow==, @@ -2617,15 +2617,15 @@ packages: "@typescript-eslint/parser": optional: true dependencies: - "@typescript-eslint/parser": 5.59.0(eslint@8.38.0)(typescript@5.0.4) + "@typescript-eslint/parser": 5.59.0(eslint@8.45.0)(typescript@5.0.4) array-includes: 3.1.6 array.prototype.flat: 1.3.1 array.prototype.flatmap: 1.3.1 debug: 3.2.7 doctrine: 2.1.0 - eslint: 8.38.0 + eslint: 8.45.0 eslint-import-resolver-node: 0.3.7 - eslint-module-utils: 2.8.0(@typescript-eslint/parser@5.59.0)(eslint-import-resolver-node@0.3.7)(eslint@8.38.0) + eslint-module-utils: 2.8.0(@typescript-eslint/parser@5.59.0)(eslint-import-resolver-node@0.3.7)(eslint@8.45.0) has: 1.0.3 is-core-module: 2.12.1 is-glob: 4.0.3 @@ -2640,7 +2640,7 @@ packages: - supports-color dev: true - /eslint-plugin-jsx-a11y@6.7.1(eslint@8.38.0): + /eslint-plugin-jsx-a11y@6.7.1(eslint@8.45.0): resolution: { integrity: sha512-63Bog4iIethyo8smBklORknVjB0T2dwB8Mr/hIC+fBS0uyHdYYpzM/Ed+YC8VxTjlXHEWFOdmgwcDn1U2L9VCA==, @@ -2658,7 +2658,7 @@ packages: axobject-query: 3.2.1 damerau-levenshtein: 1.0.8 emoji-regex: 9.2.2 - eslint: 8.38.0 + eslint: 8.45.0 has: 1.0.3 jsx-ast-utils: 3.3.4 language-tags: 1.0.5 @@ -2700,6 +2700,18 @@ packages: eslint: 8.38.0 dev: true + /eslint-plugin-react-hooks@4.6.0(eslint@8.45.0): + resolution: + { + integrity: sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g==, + } + engines: { node: ">=10" } + peerDependencies: + eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 + dependencies: + eslint: 8.45.0 + dev: true + /eslint-plugin-react-refresh@0.3.4(eslint@8.38.0): resolution: { @@ -2711,7 +2723,7 @@ packages: eslint: 8.38.0 dev: true - /eslint-plugin-react@7.32.2(eslint@8.38.0): + /eslint-plugin-react@7.32.2(eslint@8.45.0): resolution: { integrity: sha512-t2fBMa+XzonrrNkyVirzKlvn5RXzzPwRHtMvLAtVZrt8oxgnTQaYbU6SXTOO1mwQgp1y5+toMSKInnzGr0Knqg==, @@ -2724,7 +2736,7 @@ packages: array.prototype.flatmap: 1.3.1 array.prototype.tosorted: 1.1.1 doctrine: 2.1.0 - eslint: 8.38.0 + eslint: 8.45.0 estraverse: 5.3.0 jsx-ast-utils: 3.3.4 minimatch: 3.1.2 @@ -5001,7 +5013,7 @@ packages: integrity: sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==, } dependencies: - tslib: 2.4.0 + tslib: 2.6.0 dev: true /safe-array-concat@1.0.0: @@ -5507,6 +5519,7 @@ packages: { integrity: sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==, } + dev: false /tslib@2.6.0: resolution: