Skip to content

Commit

Permalink
Muxed accounts update + updated dependencies (#330)
Browse files Browse the repository at this point in the history
* Muxed accounts: update stellar-sdk

* Update dependencies + cleanup
  • Loading branch information
quietbits authored Aug 6, 2021
1 parent 1f785db commit 5287cab
Show file tree
Hide file tree
Showing 42 changed files with 386 additions and 314 deletions.
43 changes: 20 additions & 23 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@
},
"dependencies": {
"@albedo-link/intent": "^0.11.2",
"@ledgerhq/hw-app-str": "^6.1.0",
"@ledgerhq/hw-transport-webusb": "^6.1.0",
"@reduxjs/toolkit": "^1.6.0",
"@stellar/design-system": "^0.2.3",
"@stellar/freighter-api": "^1.0.1",
"@ledgerhq/hw-app-str": "^6.3.0",
"@ledgerhq/hw-transport-webusb": "^6.3.0",
"@reduxjs/toolkit": "^1.6.1",
"@stellar/design-system": "^0.3.3",
"@stellar/freighter-api": "^1.1.2",
"@stellar/wallet-sdk": "^0.4.0-rc.0",
"amplitude-js": "^8.3.1",
"amplitude-js": "^8.4.0",
"bignumber.js": "^9.0.1",
"lodash": "^4.17.21",
"moment": "^2.29.0",
"node-sass": "5.0.0",
"node-sass": "6.0.1",
"qrcode.react": "^1.0.0",
"react": "^17.0.2",
"react-copy-to-clipboard": "^5.0.2",
Expand All @@ -29,17 +29,12 @@
"react-router-dom": "^5.2.0",
"react-scripts": "^4.0.3",
"redux": "^4.1.0",
"stellar-identicon-js": "^1.0.0",
"stellar-sdk": "^8.2.3",
"stellar-sdk": "^8.2.5",
"styled-components": "^5.3.0",
"trezor-connect": "^8.1.27",
"tslib": "^2.3.0",
"typescript": "~4.3.5"
},
"resolutions": {
"**/@typescript-eslint/eslint-plugin": "^4.28.2",
"**/@typescript-eslint/parser": "^4.28.2"
},
"scripts": {
"install-if-package-changed": "git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD | grep --quiet yarn.lock && yarn install || exit 0",
"start": "react-scripts start",
Expand Down Expand Up @@ -73,35 +68,37 @@
"@stellar/tsconfig": "^1.0.2",
"@testing-library/jest-dom": "^5.14.1",
"@testing-library/react": "^12.0.0",
"@testing-library/user-event": "^13.1.9",
"@testing-library/user-event": "^13.2.1",
"@types/amplitude-js": "^8.0.1",
"@types/jest": "^26.0.24",
"@types/ledgerhq__hw-transport-u2f": "^4.21.1",
"@types/ledgerhq__hw-transport-webusb": "^4.70.1",
"@types/lodash": "^4.14.171",
"@types/node": "^16.0.1",
"@types/lodash": "^4.14.172",
"@types/node": "^16.4.13",
"@types/qrcode.react": "^1.0.2",
"@types/react": "^17.0.14",
"@types/react": "^17.0.16",
"@types/react-copy-to-clipboard": "^5.0.1",
"@types/react-dom": "^17.0.9",
"@types/react-redux": "^7.1.17",
"@types/react-redux": "^7.1.18",
"@types/react-router-dom": "^5.1.8",
"@types/redux": "^3.6.0",
"@types/styled-components": "^5.1.11",
"@types/styled-components": "^5.1.12",
"@typescript-eslint/eslint-plugin": "^4.29.0",
"@typescript-eslint/parser": "^4.29.0",
"concurrently": "^6.2.0",
"eslint": "^7.30.0",
"eslint": "^7.32.0",
"eslint-config-prettier": "^8.3.0",
"eslint-config-react": "^1.1.7",
"eslint-config-react-app": "^6.0.0",
"eslint-plugin-flowtype": "^5.8.0",
"eslint-plugin-flowtype": "^5.9.0",
"eslint-plugin-import": "^2.23.4",
"eslint-plugin-jsdoc": "^35.4.1",
"eslint-plugin-jsdoc": "^36.0.6",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-prefer-arrow": "^1.2.3",
"eslint-plugin-react": "^7.24.0",
"eslint-plugin-react-hooks": "^4.2.0",
"husky": "^7.0.1",
"lint-staged": "^11.0.0",
"lint-staged": "^11.1.2",
"prettier": "^2.3.2",
"pretty-quick": "^3.1.1"
}
Expand Down
Binary file removed public/fonts/IBMPlexMono-Medium-Latin1.woff
Binary file not shown.
Binary file removed public/fonts/IBMPlexMono-Medium-Latin1.woff2
Binary file not shown.
Binary file removed public/fonts/IBMPlexMono-Medium-Latin2.woff
Binary file not shown.
Binary file removed public/fonts/IBMPlexMono-Medium-Latin2.woff2
Binary file not shown.
Binary file removed public/fonts/IBMPlexMono-Medium-Latin3.woff
Binary file not shown.
Binary file removed public/fonts/IBMPlexMono-Medium-Latin3.woff2
Binary file not shown.
Binary file removed public/fonts/IBMPlexMono-Regular-Latin1.woff
Binary file not shown.
Binary file removed public/fonts/IBMPlexMono-Regular-Latin1.woff2
Binary file not shown.
Binary file removed public/fonts/IBMPlexMono-Regular-Latin2.woff
Binary file not shown.
Binary file removed public/fonts/IBMPlexMono-Regular-Latin2.woff2
Binary file not shown.
Binary file removed public/fonts/IBMPlexMono-Regular-Latin3.woff
Binary file not shown.
Binary file removed public/fonts/IBMPlexMono-Regular-Latin3.woff2
Binary file not shown.
Binary file removed public/fonts/IBMPlexSans-Italic-Latin1.woff
Binary file not shown.
Binary file removed public/fonts/IBMPlexSans-Italic-Latin1.woff2
Binary file not shown.
Binary file removed public/fonts/IBMPlexSans-Italic-Latin2.woff
Binary file not shown.
Binary file removed public/fonts/IBMPlexSans-Italic-Latin2.woff2
Binary file not shown.
Binary file removed public/fonts/IBMPlexSans-Italic-Latin3.woff
Binary file not shown.
Binary file removed public/fonts/IBMPlexSans-Italic-Latin3.woff2
Binary file not shown.
Binary file removed public/fonts/IBMPlexSans-Medium-Latin1.woff
Binary file not shown.
Binary file removed public/fonts/IBMPlexSans-Medium-Latin1.woff2
Binary file not shown.
Binary file removed public/fonts/IBMPlexSans-Medium-Latin2.woff
Binary file not shown.
Binary file removed public/fonts/IBMPlexSans-Medium-Latin2.woff2
Binary file not shown.
Binary file removed public/fonts/IBMPlexSans-Medium-Latin3.woff
Binary file not shown.
Binary file removed public/fonts/IBMPlexSans-Medium-Latin3.woff2
Binary file not shown.
Binary file removed public/fonts/IBMPlexSans-MediumItalic-Latin1.woff
Binary file not shown.
Binary file removed public/fonts/IBMPlexSans-MediumItalic-Latin1.woff2
Binary file not shown.
Binary file removed public/fonts/IBMPlexSans-MediumItalic-Latin2.woff
Binary file not shown.
Binary file not shown.
Binary file removed public/fonts/IBMPlexSans-MediumItalic-Latin3.woff
Binary file not shown.
Binary file removed public/fonts/IBMPlexSans-MediumItalic-Latin3.woff2
Binary file not shown.
Binary file removed public/fonts/IBMPlexSans-Regular-Latin1.woff
Binary file not shown.
Binary file removed public/fonts/IBMPlexSans-Regular-Latin1.woff2
Binary file not shown.
Binary file removed public/fonts/IBMPlexSans-Regular-Latin2.woff
Binary file not shown.
Binary file removed public/fonts/IBMPlexSans-Regular-Latin2.woff2
Binary file not shown.
Binary file removed public/fonts/IBMPlexSans-Regular-Latin3.woff
Binary file not shown.
Binary file removed public/fonts/IBMPlexSans-Regular-Latin3.woff2
Binary file not shown.
5 changes: 3 additions & 2 deletions src/components/SendTransaction/CreateTransaction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import { ErrorMessage } from "components/ErrorMessage";
import { LayoutRow } from "components/LayoutRow";
import { buildPaymentTransaction } from "helpers/buildPaymentTransaction";
import { getNetworkConfig } from "helpers/getNetworkConfig";
import { isValidMAccount } from "helpers/isValidMAccount";
import { lumensFromStroops, stroopsFromLumens } from "helpers/stroopConversion";
import { logEvent } from "helpers/tracking";
import { useRedux } from "hooks/useRedux";
Expand Down Expand Up @@ -258,7 +257,9 @@ export const CreateTransaction = ({
message = "Please enter a valid Stellar or Federated address";
} else if (
!isFederationAddress(toAccountId) &&
!isValidMAccount(toAccountId) &&
// TODO: type should be updated
// @ts-ignore
!StrKey.isValidMed25519PublicKey(toAccountId) &&
!StrKey.isValidEd25519PublicKey(toAccountId)
) {
message =
Expand Down
3 changes: 1 addition & 2 deletions src/helpers/buildPaymentTransaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import StellarSdk, { MemoType, MemoValue } from "stellar-sdk";
import { PaymentTransactionParams } from "ducks/sendTx";
import { getErrorString } from "helpers/getErrorString";
import { getNetworkConfig } from "helpers/getNetworkConfig";
import { isValidMAccount } from "helpers/isValidMAccount";
import { store } from "config/store";

const createMemo = (memoType: MemoType, memoContent: MemoValue) => {
Expand Down Expand Up @@ -48,7 +47,7 @@ export const buildPaymentTransaction = async (
destination: toAccountId,
asset: StellarSdk.Asset.native(),
amount: amount.toString(),
withMuxing: isValidMAccount(toAccountId),
withMuxing: true,
});
} else {
operation = StellarSdk.Operation.createAccount({
Expand Down
2 changes: 0 additions & 2 deletions src/helpers/isValidMAccount.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/types/@modules.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
declare module "@albedo-link/intent";
declare module "@ledgerhq/hw-app-str";
declare module "stellar-identicon-js";
Loading

0 comments on commit 5287cab

Please sign in to comment.