Skip to content

Commit

Permalink
chore: improve token price reactivity in wallet
Browse files Browse the repository at this point in the history
  • Loading branch information
zensh committed Dec 10, 2024
1 parent 554ebdf commit 6c26d1a
Show file tree
Hide file tree
Showing 22 changed files with 402 additions and 118 deletions.
25 changes: 25 additions & 0 deletions proposals/proposal-267.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/env bash

# Load the environment variables
source "$(pwd)"/proposals/env.sh

# build and get batch_id, evidence:
# dfx deploy ic_message_frontend --ic --by-proposal

export BLOB="$(didc encode --format blob '(record {batch_id=40:nat; evidence=blob "\fe\dc\ef\ba\6f\8b\d5\f2\7a\61\67\09\b4\21\a6\08\dc\11\c4\11\06\cd\c6\45\71\59\e6\2f\1d\2c\e9\f1"})')"

quill sns make-proposal --canister-ids-file ./sns_canister_ids.json --pem-file $PROPOSAL_PEM_FILE $PROPOSAL_NEURON_ID --proposal "(
record {
title = \"Execute commit_proposed_batch() to release ic_message_frontend v2.8.5\";
url = \"https://dMsg.net/\";
summary = \"This proposal executes commit_proposed_batch() on 2fvu6-tqaaa-aaaap-akksa-cai to release ic_message_frontend v2.8.5.\n\n1. feat: add token price info.\";
action = opt variant {
ExecuteGenericNervousSystemFunction = record {
function_id = 1100 : nat64;
payload = ${BLOB};
}
};
}
)" > proposal-message.json

# quill send proposal-message.json
25 changes: 25 additions & 0 deletions proposals/proposal-268.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/env bash

# Load the environment variables
source "$(pwd)"/proposals/env.sh

# build and get batch_id, evidence:
# dfx deploy ic_message_frontend --ic --by-proposal

export BLOB="$(didc encode --format blob '(record {batch_id=41:nat; evidence=blob "\ad\98\2d\a3\bf\62\82\20\54\cb\3c\88\06\64\24\ab\e2\b5\01\a1\60\7b\49\ef\68\65\31\26\79\41\c0\d3"})')"

quill sns make-proposal --canister-ids-file ./sns_canister_ids.json --pem-file $PROPOSAL_PEM_FILE $PROPOSAL_NEURON_ID --proposal "(
record {
title = \"Execute commit_proposed_batch() to release ic_message_frontend v2.8.6\";
url = \"https://dMsg.net/\";
summary = \"This proposal executes commit_proposed_batch() on 2fvu6-tqaaa-aaaap-akksa-cai to release ic_message_frontend v2.8.6.\n\n1. chore: improve token price reactivity in wallet.\";
action = opt variant {
ExecuteGenericNervousSystemFunction = record {
function_id = 1100 : nat64;
payload = ${BLOB};
}
};
}
)" > proposal-message.json

# quill send proposal-message.json
2 changes: 1 addition & 1 deletion src/ic_message_frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,5 +83,5 @@
"test": "vitest run"
},
"type": "module",
"version": "2.8.5"
"version": "2.8.6"
}
2 changes: 1 addition & 1 deletion src/ic_message_frontend/src/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<link href="https://dmsg.net" rel="canonical" />
<meta content="ICPanda Message - dMsg.net" property="og:title" />
<meta
content="A decentralized end-to-end encrypted messaging application fully running on the Internet Computer blockchain."
content="The world's 1st decentralized end-to-end encrypted messaging application fully running on the Internet Computer blockchain."
name="description" property="og:description" />
<meta content="website" property="og:type" />
<meta content="https://dmsg.net" property="og:url" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,9 @@ type AssetCanisterArgs = variant {
Upgrade: UpgradeArgs;
};

type InitArgs = record {};
type InitArgs = record {
set_permissions: opt SetPermissions;
};

type UpgradeArgs = record {
set_permissions: opt SetPermissions;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export interface HttpResponse {
'streaming_strategy' : [] | [StreamingStrategy],
'status_code' : number,
}
export type InitArgs = {};
export interface InitArgs { 'set_permissions' : [] | [SetPermissions] }
export type Key = string;
export interface ListPermitted { 'permission' : Permission }
export type Permission = { 'Prepare' : null } |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const idlFactory = ({ IDL }) => {
const UpgradeArgs = IDL.Record({
'set_permissions' : IDL.Opt(SetPermissions),
});
const InitArgs = IDL.Record({});
const InitArgs = IDL.Record({ 'set_permissions' : IDL.Opt(SetPermissions) });
const AssetCanisterArgs = IDL.Variant({
'Upgrade' : UpgradeArgs,
'Init' : InitArgs,
Expand Down Expand Up @@ -287,7 +287,7 @@ export const init = ({ IDL }) => {
const UpgradeArgs = IDL.Record({
'set_permissions' : IDL.Opt(SetPermissions),
});
const InitArgs = IDL.Record({});
const InitArgs = IDL.Record({ 'set_permissions' : IDL.Opt(SetPermissions) });
const AssetCanisterArgs = IDL.Variant({
'Upgrade' : UpgradeArgs,
'Init' : InitArgs,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ type BucketInfo = record {
total_chunks : nat64;
trusted_eddsa_pub_keys : vec blob;
managers : vec principal;
governance_canister : opt principal;
name : text;
max_custom_data_size : nat16;
auditors : vec principal;
Expand Down Expand Up @@ -79,6 +80,7 @@ type FolderInfo = record {
};
type FolderName = record { id : nat32; name : text };
type InitArgs = record {
governance_canister : opt principal;
name : text;
max_custom_data_size : nat16;
max_children : nat16;
Expand Down Expand Up @@ -146,6 +148,7 @@ type UpdateFolderInput = record {
name : opt text;
};
type UpgradeArgs = record {
governance_canister : opt principal;
max_custom_data_size : opt nat16;
max_children : opt nat16;
enable_hash_index : opt bool;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export interface BucketInfo {
'total_chunks' : bigint,
'trusted_eddsa_pub_keys' : Array<Uint8Array | number[]>,
'managers' : Array<Principal>,
'governance_canister' : [] | [Principal],
'name' : string,
'max_custom_data_size' : number,
'auditors' : Array<Principal>,
Expand Down Expand Up @@ -86,6 +87,7 @@ export interface FolderInfo {
}
export interface FolderName { 'id' : number, 'name' : string }
export interface InitArgs {
'governance_canister' : [] | [Principal],
'name' : string,
'max_custom_data_size' : number,
'max_children' : number,
Expand Down Expand Up @@ -175,6 +177,7 @@ export interface UpdateFolderInput {
'name' : [] | [string],
}
export interface UpgradeArgs {
'governance_canister' : [] | [Principal],
'max_custom_data_size' : [] | [number],
'max_children' : [] | [number],
'enable_hash_index' : [] | [boolean],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
export const idlFactory = ({ IDL }) => {
const UpgradeArgs = IDL.Record({
'governance_canister' : IDL.Opt(IDL.Principal),
'max_custom_data_size' : IDL.Opt(IDL.Nat16),
'max_children' : IDL.Opt(IDL.Nat16),
'enable_hash_index' : IDL.Opt(IDL.Bool),
'max_file_size' : IDL.Opt(IDL.Nat64),
'max_folder_depth' : IDL.Opt(IDL.Nat8),
});
const InitArgs = IDL.Record({
'governance_canister' : IDL.Opt(IDL.Principal),
'name' : IDL.Text,
'max_custom_data_size' : IDL.Nat16,
'max_children' : IDL.Nat16,
Expand Down Expand Up @@ -66,6 +68,7 @@ export const idlFactory = ({ IDL }) => {
'total_chunks' : IDL.Nat64,
'trusted_eddsa_pub_keys' : IDL.Vec(IDL.Vec(IDL.Nat8)),
'managers' : IDL.Vec(IDL.Principal),
'governance_canister' : IDL.Opt(IDL.Principal),
'name' : IDL.Text,
'max_custom_data_size' : IDL.Nat16,
'auditors' : IDL.Vec(IDL.Principal),
Expand Down Expand Up @@ -365,13 +368,15 @@ export const idlFactory = ({ IDL }) => {
};
export const init = ({ IDL }) => {
const UpgradeArgs = IDL.Record({
'governance_canister' : IDL.Opt(IDL.Principal),
'max_custom_data_size' : IDL.Opt(IDL.Nat16),
'max_children' : IDL.Opt(IDL.Nat16),
'enable_hash_index' : IDL.Opt(IDL.Bool),
'max_file_size' : IDL.Opt(IDL.Nat64),
'max_folder_depth' : IDL.Opt(IDL.Nat8),
});
const InitArgs = IDL.Record({
'governance_canister' : IDL.Opt(IDL.Principal),
'name' : IDL.Text,
'max_custom_data_size' : IDL.Nat16,
'max_children' : IDL.Nat16,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ type UpgradeArgs = record {
change_fee_collector : opt ChangeFeeCollector;
max_memo_length : opt nat16;
feature_flags : opt FeatureFlags;
maximum_number_of_accounts: opt nat64;
accounts_overflow_trim_quantity: opt nat64;
change_archive_options : opt ChangeArchiveOptions;
};
Expand Down Expand Up @@ -427,6 +426,7 @@ type ICRC3DataCertificate = record {

type icrc21_consent_message_metadata = record {
language: text;
utc_offset_minutes: opt int16;
};

type icrc21_consent_message_spec = record {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,6 @@ export interface UpgradeArgs {
'token_symbol' : [] | [string],
'transfer_fee' : [] | [bigint],
'metadata' : [] | [Array<[string, MetadataValue]>],
'maximum_number_of_accounts' : [] | [bigint],
'accounts_overflow_trim_quantity' : [] | [bigint],
'change_fee_collector' : [] | [ChangeFeeCollector],
'max_memo_length' : [] | [number],
Expand All @@ -266,7 +265,10 @@ export type icrc21_consent_message = {
'LineDisplayMessage' : { 'pages' : Array<{ 'lines' : Array<string> }> }
} |
{ 'GenericDisplayMessage' : string };
export interface icrc21_consent_message_metadata { 'language' : string }
export interface icrc21_consent_message_metadata {
'utc_offset_minutes' : [] | [number],
'language' : string,
}
export interface icrc21_consent_message_request {
'arg' : Uint8Array | number[],
'method' : string,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ export const idlFactory = ({ IDL }) => {
'token_symbol' : IDL.Opt(IDL.Text),
'transfer_fee' : IDL.Opt(IDL.Nat),
'metadata' : IDL.Opt(IDL.Vec(IDL.Tuple(IDL.Text, MetadataValue))),
'maximum_number_of_accounts' : IDL.Opt(IDL.Nat64),
'accounts_overflow_trim_quantity' : IDL.Opt(IDL.Nat64),
'change_fee_collector' : IDL.Opt(ChangeFeeCollector),
'max_memo_length' : IDL.Opt(IDL.Nat16),
Expand Down Expand Up @@ -207,7 +206,10 @@ export const idlFactory = ({ IDL }) => {
'Ok' : BlockIndex,
'Err' : TransferError,
});
const icrc21_consent_message_metadata = IDL.Record({ 'language' : IDL.Text });
const icrc21_consent_message_metadata = IDL.Record({
'utc_offset_minutes' : IDL.Opt(IDL.Int16),
'language' : IDL.Text,
});
const icrc21_consent_message_spec = IDL.Record({
'metadata' : icrc21_consent_message_metadata,
'device_spec' : IDL.Opt(
Expand Down Expand Up @@ -448,7 +450,6 @@ export const init = ({ IDL }) => {
'token_symbol' : IDL.Opt(IDL.Text),
'transfer_fee' : IDL.Opt(IDL.Nat),
'metadata' : IDL.Opt(IDL.Vec(IDL.Tuple(IDL.Text, MetadataValue))),
'maximum_number_of_accounts' : IDL.Opt(IDL.Nat64),
'accounts_overflow_trim_quantity' : IDL.Opt(IDL.Nat64),
'change_fee_collector' : IDL.Opt(ChangeFeeCollector),
'max_memo_length' : IDL.Opt(IDL.Nat16),
Expand Down
Loading

0 comments on commit 6c26d1a

Please sign in to comment.