Skip to content

Commit

Permalink
fixing title order
Browse files Browse the repository at this point in the history
  • Loading branch information
spoo-bar committed Dec 14, 2023
1 parent 0ea99ec commit 788afb9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,10 @@
"icon": "$(add)"
},
{
"command": "cosmy-wasmy.addAllContracts",
"title": "%cosmy-wasmy.addAllContracts.title%",
"command": "cosmy-wasmy.addContractsAll",
"title": "%cosmy-wasmy.addContractsAll.title%",
"category": "Cosmy Wasmy",
"icon": "$(cloud-download)"
"icon": "$(expand-all)"
},
{
"command": "cosmy-wasmy.deleteContract",
Expand Down Expand Up @@ -652,7 +652,7 @@
"group": "navigation"
},
{
"command": "cosmy-wasmy.addAllContracts",
"command": "cosmy-wasmy.addContractsAll",
"when": "view == contract",
"group": "navigation"
},
Expand Down
2 changes: 1 addition & 1 deletion package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"cosmy-wasmy.sendTokens.title": "Send Tokens",
"cosmy-wasmy.refreshAccount.title": "Refresh Account View",
"cosmy-wasmy.addContract.title": "Import Contract",
"cosmy-wasmy.addAllContracts.title": "Import All Contracts",
"cosmy-wasmy.addContractsAll.title": "Import Contracts - All",
"cosmy-wasmy.deleteContract.title": "Delete Contract",
"cosmy-wasmy.updateContractAdmin.title": "Update Admin",
"cosmy-wasmy.clearContractAdmin.title": "Clear Admin",
Expand Down
13 changes: 7 additions & 6 deletions src/commands/contract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,20 +75,21 @@ export class ContractCmds {
}

private static registerAddAllContractsCmd(context: vscode.ExtensionContext, contractViewProvider: ContractDataProvider) {
let disposable = vscode.commands.registerCommand('cosmy-wasmy.addAllContracts', () => {
CosmwasmAPI.GetAllContracts().then(contracts => {
console.log("done")
})
let disposable = vscode.commands.registerCommand('cosmy-wasmy.addContractsAll', () => {
if (global.workspaceChain.chainEnvironment == "localnet") {

importAllContracts();
}
else {
vscode.window.showErrorMessage(vscode.l10n.t("Sorry! This command is only available for localnet chains"));
}
});
context.subscriptions.push(disposable);

function importContract(contractAddr: string) {
function importAllContracts() {
CosmwasmAPI.GetAllContracts().then(contracts => {
console.log("done")
})

if (!Contract.ContractAddressExists(context.globalState, contractAddr)) {
vscode.window.withProgress({
location: vscode.ProgressLocation.Notification,
Expand Down

0 comments on commit 788afb9

Please sign in to comment.