Skip to content
This repository has been archived by the owner on Oct 8, 2020. It is now read-only.

Commit

Permalink
update wallet-api
Browse files Browse the repository at this point in the history
  • Loading branch information
Rovak committed Apr 17, 2018
1 parent aacdd96 commit 9811bad
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 10 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@tronprotocol/wallet-api": "^0.0.22",
"@tronprotocol/wallet-api": "^0.0.23",
"autoprefixer": "7.1.6",
"axios": "^0.18.0",
"babel-core": "6.26.0",
Expand Down
7 changes: 3 additions & 4 deletions src/components/transfer/Send.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import {loadTokenBalances} from "../../actions/account";
import {tu} from "../../utils/i18n";
import {Client} from "../../services/api";
import {Link} from "react-router-dom";
import {passwordToAddress} from "@tronprotocol/wallet-api/src/utils/crypto";
import {isAddressValid} from "@tronprotocol/wallet-api/src/utils/address";
import {isAddressValid, passwordToAddress} from "@tronprotocol/wallet-api/src/utils/crypto";
import SendOption from "./SendOption";
import {find} from "lodash";
import {ONE_TRX} from "../../constants";
Expand All @@ -34,7 +33,7 @@ class Send extends React.Component {
*/
isValid = () => {
let {to, token, amount} = this.state;
const {account} = this.props ;
const {account} = this.props ;
let address = passwordToAddress(account.key);

return isAddressValid(to) && token !== "" && this.getSelectedTokenBalance() >= amount && amount > 0 && to !== address ; ;
Expand Down Expand Up @@ -206,7 +205,7 @@ class Send extends React.Component {
<input type="number"
onChange={(ev) => this.setAmount(ev.target.value) }
className={"form-control " + (!isAmountValid ? "is-invalid" : "")}
value={amount}
value={amount}
placeholder='0.0000'/>
<div className="invalid-feedback">
{tu("insufficient_tokens")}
Expand Down
26 changes: 21 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
lodash "^4.2.0"
to-fast-properties "^2.0.0"

"@tronprotocol/wallet-api@^0.0.22":
version "0.0.22"
resolved "https://registry.yarnpkg.com/@tronprotocol/wallet-api/-/wallet-api-0.0.22.tgz#855bd0ddcbd4f270469fab16deae0b48b8391638"
"@tronprotocol/wallet-api@^0.0.23":
version "0.0.23"
resolved "https://registry.yarnpkg.com/@tronprotocol/wallet-api/-/wallet-api-0.0.23.tgz#79d53e49fc7e65addee893b8f1fc6f6c21794aa4"
dependencies:
axios "^0.18.0"
chai "^4.1.2"
Expand All @@ -30,7 +30,7 @@
grpc-caller "^0.4.0"
grpc-tools "^1.6.6"
js-sha3 "^0.7.0"
mocha "^5.0.5"
mocha "^5.1.0"
qs "^6.5.1"

abab@^1.0.3:
Expand Down Expand Up @@ -4961,7 +4961,7 @@ minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a"

"minimatch@2 || 3", minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4, minimatch@~3.0.2:
"minimatch@2 || 3", minimatch@3.0.4, minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4, minimatch@~3.0.2:
version "3.0.4"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
dependencies:
Expand Down Expand Up @@ -5020,6 +5020,22 @@ mocha@^5.0.5:
mkdirp "0.5.1"
supports-color "4.4.0"

mocha@^5.1.0:
version "5.1.0"
resolved "https://registry.yarnpkg.com/mocha/-/mocha-5.1.0.tgz#5ff11cc39c0bb65330ac6c41f9086634e3e3f686"
dependencies:
browser-stdout "1.3.1"
commander "2.11.0"
debug "3.1.0"
diff "3.5.0"
escape-string-regexp "1.0.5"
glob "7.1.2"
growl "1.10.3"
he "1.1.1"
minimatch "3.0.4"
mkdirp "0.5.1"
supports-color "4.4.0"

ms@2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
Expand Down

0 comments on commit 9811bad

Please sign in to comment.