Skip to content

Commit

Permalink
Merge pull request spoo-bar#75 from spoo-bar/removing-init-+-import
Browse files Browse the repository at this point in the history
fix: fixing not being able to import contract after copying address
  • Loading branch information
spoo-bar authored Jul 7, 2023
2 parents fdd1100 + bc5e2e5 commit acb580e
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 16 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,16 @@ All notable changes to the Cosmy Wasmy extension will be documented in this file
### Security
-->

## [v2.3.1] - 07 July 2023

### Removed

- The 'Initialize + Import' button in the contract initialize view.

### Fixed

- Fixed the issue where could not import a new contract after copying an address to the clipboard from the extension

## [v2.3.0] - 12 June 2023

### Added
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "cosmy-wasmy",
"displayName": "Cosmy Wasmy",
"description": "wibbly wobbly cosmy wasmy tool to interact with cosmwasm smart contracts",
"version": "2.3.0",
"version": "2.3.1",
"preview": false,
"publisher": "Spoorthi",
"icon": "media/icon.png",
Expand Down
23 changes: 9 additions & 14 deletions src/commands/contract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,15 @@ export class ContractCmds {
}

private static registerAddContractCmd(context: vscode.ExtensionContext, contractViewProvider: ContractDataProvider) {
let disposable = vscode.commands.registerCommand('cosmy-wasmy.addContract', (contractAddr: string) => {
if (contractAddr) {
importContract(contractAddr);
}
else {
vscode.window.showInputBox({
title: vscode.l10n.t("Contract Address"),
placeHolder: vscode.l10n.t("Cosmwasm contract address")
}).then(contractAddrInput => {
if (contractAddrInput) {
importContract(contractAddrInput);
}
});
}
let disposable = vscode.commands.registerCommand('cosmy-wasmy.addContract', () => {
vscode.window.showInputBox({
title: vscode.l10n.t("Contract Address"),
placeHolder: vscode.l10n.t("Cosmwasm contract address")
}).then(contractAddrInput => {
if (contractAddrInput) {
importContract(contractAddrInput);
}
});
});
context.subscriptions.push(disposable);

Expand Down
2 changes: 1 addition & 1 deletion src/views/InitializeViewProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ export class InitializeViewProvider implements vscode.WebviewViewProvider {
<input id="funds-text" placeholder="10${denom}"></input>
<textarea id="input-text" placeholder="{'count': 100}"></textarea>
<button id="exec-button">${vscode.l10n.t("Initialize")}</button>
<button id="exec-import-button" title="Initialize the contract and automatically import it to Cosmy Wasmy">${vscode.l10n.t("Initialize")} + ${vscode.l10n.t("Import")}</button>
<!-- <button id="exec-import-button" title="Initialize the contract and automatically import it to Cosmy Wasmy">${vscode.l10n.t("Initialize")} + ${vscode.l10n.t("Import")}</button> -->
<script>
(function () {
const vscode = acquireVsCodeApi();
Expand Down

0 comments on commit acb580e

Please sign in to comment.