Skip to content
This repository has been archived by the owner on Mar 23, 2023. It is now read-only.

Commit

Permalink
chore: update Platform SDK dependencies (#2655)
Browse files Browse the repository at this point in the history
  • Loading branch information
faustbrian committed Aug 12, 2020
1 parent e8c5b28 commit 60be2ff
Show file tree
Hide file tree
Showing 4 changed files with 192 additions and 187 deletions.
38 changes: 19 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,25 +117,25 @@
"testRunner": "jest-circus/runner"
},
"dependencies": {
"@arkecosystem/platform-sdk": "^0.9.255",
"@arkecosystem/platform-sdk-ada": "^0.9.255",
"@arkecosystem/platform-sdk-ark": "^0.9.255",
"@arkecosystem/platform-sdk-atom": "^0.9.255",
"@arkecosystem/platform-sdk-btc": "^0.9.255",
"@arkecosystem/platform-sdk-crypto": "^0.9.255",
"@arkecosystem/platform-sdk-eos": "^0.9.255",
"@arkecosystem/platform-sdk-eth": "^0.9.255",
"@arkecosystem/platform-sdk-intl": "^0.9.255",
"@arkecosystem/platform-sdk-lsk": "^0.9.255",
"@arkecosystem/platform-sdk-markets": "^0.9.255",
"@arkecosystem/platform-sdk-neo": "^0.9.255",
"@arkecosystem/platform-sdk-news": "^0.9.255",
"@arkecosystem/platform-sdk-profiles": "^0.9.255",
"@arkecosystem/platform-sdk-support": "^0.9.255",
"@arkecosystem/platform-sdk-trx": "^0.9.255",
"@arkecosystem/platform-sdk-xlm": "^0.9.255",
"@arkecosystem/platform-sdk-xmr": "^0.9.255",
"@arkecosystem/platform-sdk-xrp": "^0.9.255",
"@arkecosystem/platform-sdk": "^0.9.257",
"@arkecosystem/platform-sdk-ada": "^0.9.257",
"@arkecosystem/platform-sdk-ark": "^0.9.257",
"@arkecosystem/platform-sdk-atom": "^0.9.257",
"@arkecosystem/platform-sdk-btc": "^0.9.257",
"@arkecosystem/platform-sdk-crypto": "^0.9.257",
"@arkecosystem/platform-sdk-eos": "^0.9.257",
"@arkecosystem/platform-sdk-eth": "^0.9.257",
"@arkecosystem/platform-sdk-intl": "^0.9.257",
"@arkecosystem/platform-sdk-lsk": "^0.9.257",
"@arkecosystem/platform-sdk-markets": "^0.9.257",
"@arkecosystem/platform-sdk-neo": "^0.9.257",
"@arkecosystem/platform-sdk-news": "^0.9.257",
"@arkecosystem/platform-sdk-profiles": "^0.9.257",
"@arkecosystem/platform-sdk-support": "^0.9.257",
"@arkecosystem/platform-sdk-trx": "^0.9.257",
"@arkecosystem/platform-sdk-xlm": "^0.9.257",
"@arkecosystem/platform-sdk-xmr": "^0.9.257",
"@arkecosystem/platform-sdk-xrp": "^0.9.257",
"@arkecosystem/utils": "^1.1.8",
"@tippyjs/react": "^4.0.5",
"about-window": "^1.13.4",
Expand Down
4 changes: 3 additions & 1 deletion src/app/components/Input/InputAddress.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { Coins } from "@arkecosystem/platform-sdk";
import { Icon } from "app/components/Icon";
import { useEnvironmentContext } from "app/contexts";
import React from "react";
Expand Down Expand Up @@ -32,7 +33,8 @@ export const InputAddress = ({
const { env } = useEnvironmentContext();

const validateAddress = async (address: string) => {
const isValidAddress = await env.dataValidator().address(coin as string, network as string, address);
const instance: Coins.Coin = await env.coin(coin!, network!);
const isValidAddress: boolean = await instance.identity().address().validate(address);

if (isValidAddress) {
onValidAddress?.(address);
Expand Down
5 changes: 4 additions & 1 deletion src/domains/contact/components/ContactForm/ContactForm.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { Coins } from "@arkecosystem/platform-sdk";
import { Contact, ContactAddress, NetworkData } from "@arkecosystem/platform-sdk-profiles";
import { Address } from "app/components/Address";
import { Avatar } from "app/components/Avatar";
Expand Down Expand Up @@ -118,7 +119,9 @@ export const ContactForm = ({ contact, networks, onChange, onCancel, onDelete, o
return form.setError("address", "manual", t("CONTACTS.VALIDATION.ADDRESS_EXISTS", { address }));
}

const isValidAddress = await env.dataValidator().address(network.coin(), network.id(), address);
const instance: Coins.Coin = await env.coin(network.coin(), network.id());
const isValidAddress: boolean = await instance.identity().address().validate(address);

if (!isValidAddress) {
return form.setError("address", "manual", t("CONTACTS.VALIDATION.ADDRESS_IS_INVALID"));
}
Expand Down

0 comments on commit 60be2ff

Please sign in to comment.