Update Ligo IDE to use new Wallet API
This commit is contained in:
parent
13eae4be18
commit
a28b81379f
@ -6,8 +6,9 @@
|
|||||||
"@fortawesome/fontawesome-svg-core": "^1.2.25",
|
"@fortawesome/fontawesome-svg-core": "^1.2.25",
|
||||||
"@fortawesome/free-solid-svg-icons": "^5.11.2",
|
"@fortawesome/free-solid-svg-icons": "^5.11.2",
|
||||||
"@fortawesome/react-fontawesome": "^0.1.6",
|
"@fortawesome/react-fontawesome": "^0.1.6",
|
||||||
"@taquito/taquito": "^6.1.0-beta.0",
|
"@taquito/taquito": "^6.3.0-wallet.4",
|
||||||
"@taquito/tezbridge-signer": "^6.1.0-beta.0",
|
"@taquito/tezbridge-signer": "^6.3.0-wallet.4",
|
||||||
|
"@taquito/tezbridge-wallet": "^6.3.0-wallet.4",
|
||||||
"@types/jest": "24.0.18",
|
"@types/jest": "24.0.18",
|
||||||
"@types/node": "12.7.12",
|
"@types/node": "12.7.12",
|
||||||
"@types/react": "16.9.5",
|
"@types/react": "16.9.5",
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { Tezos } from '@taquito/taquito';
|
import { Tezos } from '@taquito/taquito';
|
||||||
import { TezBridgeSigner } from '@taquito/tezbridge-signer';
|
import { TezBridgeWallet } from '@taquito/tezbridge-wallet';
|
||||||
import { Dispatch } from 'redux';
|
import { Dispatch } from 'redux';
|
||||||
|
|
||||||
import { compileContract, compileStorage, deploy, getErrorMessage } from '../../services/api';
|
import { compileContract, compileStorage, deploy, getErrorMessage } from '../../services/api';
|
||||||
@ -12,7 +12,7 @@ import { CancellableAction } from './cancellable';
|
|||||||
|
|
||||||
Tezos.setProvider({
|
Tezos.setProvider({
|
||||||
rpc: 'https://api.tez.ie/rpc/carthagenet',
|
rpc: 'https://api.tez.ie/rpc/carthagenet',
|
||||||
signer: new TezBridgeSigner()
|
wallet: new TezBridgeWallet()
|
||||||
});
|
});
|
||||||
|
|
||||||
export class DeployAction extends CancellableAction {
|
export class DeployAction extends CancellableAction {
|
||||||
@ -45,12 +45,12 @@ export class DeployAction extends CancellableAction {
|
|||||||
return;
|
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),
|
code: JSON.parse(michelsonCode.result),
|
||||||
init: JSON.parse(michelsonStorage.result)
|
init: JSON.parse(michelsonStorage.result)
|
||||||
});
|
}).send();
|
||||||
|
|
||||||
if (this.isCancelled()) {
|
if (this.isCancelled()) {
|
||||||
return;
|
return;
|
||||||
@ -61,7 +61,7 @@ export class DeployAction extends CancellableAction {
|
|||||||
});
|
});
|
||||||
return {
|
return {
|
||||||
address: (await op.contract()).address,
|
address: (await op.contract()).address,
|
||||||
storage: michelsonStorage
|
storage: michelsonStorage.result
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user