From a28b81379ff6631363f7ecac7599d441d386107e Mon Sep 17 00:00:00 2001 From: Roxane Letourneau Date: Tue, 2 Jun 2020 13:42:18 -0700 Subject: [PATCH] Update Ligo IDE to use new Wallet API --- tools/webide/packages/client/package.json | 5 +++-- .../packages/client/src/redux/actions/deploy.ts | 12 ++++++------ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/tools/webide/packages/client/package.json b/tools/webide/packages/client/package.json index d6ef4e53c..15b583b05 100644 --- a/tools/webide/packages/client/package.json +++ b/tools/webide/packages/client/package.json @@ -6,8 +6,9 @@ "@fortawesome/fontawesome-svg-core": "^1.2.25", "@fortawesome/free-solid-svg-icons": "^5.11.2", "@fortawesome/react-fontawesome": "^0.1.6", - "@taquito/taquito": "^6.1.0-beta.0", - "@taquito/tezbridge-signer": "^6.1.0-beta.0", + "@taquito/taquito": "^6.3.0-wallet.4", + "@taquito/tezbridge-signer": "^6.3.0-wallet.4", + "@taquito/tezbridge-wallet": "^6.3.0-wallet.4", "@types/jest": "24.0.18", "@types/node": "12.7.12", "@types/react": "16.9.5", diff --git a/tools/webide/packages/client/src/redux/actions/deploy.ts b/tools/webide/packages/client/src/redux/actions/deploy.ts index 77977b04d..36549d80b 100644 --- a/tools/webide/packages/client/src/redux/actions/deploy.ts +++ b/tools/webide/packages/client/src/redux/actions/deploy.ts @@ -1,5 +1,5 @@ import { Tezos } from '@taquito/taquito'; -import { TezBridgeSigner } from '@taquito/tezbridge-signer'; +import { TezBridgeWallet } from '@taquito/tezbridge-wallet'; import { Dispatch } from 'redux'; import { compileContract, compileStorage, deploy, getErrorMessage } from '../../services/api'; @@ -12,7 +12,7 @@ import { CancellableAction } from './cancellable'; Tezos.setProvider({ rpc: 'https://api.tez.ie/rpc/carthagenet', - signer: new TezBridgeSigner() + wallet: new TezBridgeWallet() }); export class DeployAction extends CancellableAction { @@ -45,12 +45,12 @@ export class DeployAction extends CancellableAction { return; } - dispatch({ ...new UpdateLoadingAction('Waiting for TezBridge signer...') }); + dispatch({ ...new UpdateLoadingAction('Waiting for TezBridge wallet...') }); - const op = await Tezos.contract.originate({ + const op = await Tezos.wallet.originate({ code: JSON.parse(michelsonCode.result), init: JSON.parse(michelsonStorage.result) - }); + }).send(); if (this.isCancelled()) { return; @@ -61,7 +61,7 @@ export class DeployAction extends CancellableAction { }); return { address: (await op.contract()).address, - storage: michelsonStorage + storage: michelsonStorage.result }; }