Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/adena-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@
"webpack-merge": "5.10.0"
},
"dependencies": {
"@adena-wallet/sdk": "0.0.2",
"@adena-wallet/sdk": "0.0.10",
"@bufbuild/protobuf": "2.2.3",
"@gnolang/gno-js-client": "1.3.2",
"@gnolang/gno-js-client": "1.4.1",
"@gnolang/tm2-js-client": "1.3.0",
"@tanstack/react-query": "4.36.1",
"adena-module": "*",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,6 @@ export const validateTransactionMessageOfAddPkg = (message: { [key in string]: a
if (typeof message.value.creator !== 'string') {
return false;
}
if (typeof message.value.max_deposit !== 'string') {
return false;
}
if (typeof message.value.package !== 'object') {
return false;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import React, { useMemo } from 'react';

import { ContractMessage } from '@adena-wallet/sdk';

import { GnoArgumentInfo } from '@inject/message/methods/gno-connect';
import { ContractMessage } from '@inject/types';
import ApproveTransactionMessage from '../approve-transaction-message/approve-transaction-message';
import { ApproveTransactionMessageBoxWrapper } from './approve-transaction-message-box.styles';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ describe('ApproveTransactionMessage Component', () => {
caller: '',
func: '',
pkg_path: '',
max_deposit: '',
send: '',
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ function makeTransactionMessage(
pkg_path: gnoMessageInfo.packagePath,
func: gnoMessageInfo.functionName,
args: messageArguments,
max_deposit: gnoMessageInfo.maxDeposit,
},
},
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export interface GnoMessageInfo {
packagePath: string;
functionName: string;
send: string;
maxDeposit: string;
args: GnoArgumentInfo[] | null;
}

Expand Down Expand Up @@ -96,6 +97,7 @@ export function parseGnoMessageInfo(href: string): GnoMessageInfo | null {
packagePath: '',
functionName: '',
send: '',
maxDeposit: '',
args: null,
};
const splitter = '$help';
Expand Down Expand Up @@ -134,6 +136,11 @@ export function parseGnoMessageInfo(href: string): GnoMessageInfo | null {
continue;
}

if (key === '.max_deposit') {
messageInfo.maxDeposit = value || '';
continue;
}

args.push({
index: argumentIndex,
key,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ describe('serialized wallet migration V011', () => {
const migration = new StorageMigration011();
const result = await migration.up(mockData);

expect(result.data.CURRENT_CHAIN_ID).toEqual('test7');
expect(result.data.CURRENT_NETWORK_ID).toEqual('test7');
expect(result.data.CURRENT_CHAIN_ID).toEqual('test7.2');
expect(result.data.CURRENT_NETWORK_ID).toEqual('test7.2');
});

it('up password success', async () => {
Expand All @@ -58,8 +58,8 @@ describe('serialized wallet migration V011', () => {
expect(wallet.accounts).toHaveLength(0);
expect(wallet.keyrings).toHaveLength(0);

expect(result.data.CURRENT_CHAIN_ID).toEqual('test7');
expect(result.data.CURRENT_NETWORK_ID).toEqual('test7');
expect(result.data.CURRENT_CHAIN_ID).toEqual('test7.2');
expect(result.data.CURRENT_NETWORK_ID).toEqual('test7.2');
});

it('up failed throw error', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export class StorageMigration011 implements Migration<StorageModelDataV011> {

private migrateCurrentChainId(currentChainId: CurrentChainIdModelV010): CurrentChainIdModelV011 {
if (currentChainId === 'test6') {
return 'test7';
return 'test7.2';
}
return currentChainId;
}
Expand All @@ -95,7 +95,7 @@ export class StorageMigration011 implements Migration<StorageModelDataV011> {
currentNetworkId: CurrentNetworkIdModelV010,
): CurrentNetworkIdModelV011 {
if (currentNetworkId === 'test6') {
return 'test7';
return 'test7.2';
}
return currentNetworkId;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,23 @@ export interface MsgRunValue {
caller?: string;
send?: string;
package?: Package;
max_deposit?: string;
}

export interface MsgCallValue {
caller?: string;
send?: string;
pkg_path?: string;
max_deposit?: string;
func?: string;
args?: string[];
}

export interface AddPackageValue {
creator?: string;
deposit?: string;
package?: Package;
send?: string;
max_deposit?: string;
}

export interface Package {
Expand Down
8 changes: 4 additions & 4 deletions packages/adena-extension/src/resources/chains/chains.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[
{
"id": "test7",
"id": "test7.2",
"default": true,
"main": true,
"chainId": "test7",
"chainId": "test7.2",
"chainName": "Gno.land",
"networkId": "test7",
"networkId": "test7.2",
"networkName": "Testnet 7",
"addressPrefix": "g",
"rpcUrl": "https://test7.onbloc.xyz:443",
"rpcUrl": "https://rpc.test7.testnets.gno.land:443",
"indexerUrl": "https://test7.indexer.onbloc.xyz",
"gnoUrl": "https://test7.testnets.gno.land",
"apiUrl": "https://test7.api.onbloc.xyz",
Expand Down
2 changes: 1 addition & 1 deletion packages/adena-module/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
},
"dependencies": {
"@cosmjs/ledger-amino": "0.34.0",
"@gnolang/gno-js-client": "1.3.2",
"@gnolang/gno-js-client": "1.4.1",
"@gnolang/tm2-js-client": "1.3.0",
"@ledgerhq/hw-transport": "6.31.4",
"@ledgerhq/hw-transport-mocker": "6.29.4",
Expand Down
Loading