Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ use ic_ledger_core::tokens::Zero;
use ic_ledger_core::tokens::{CheckedAdd, CheckedSub};
use icrc_ledger_types::icrc1::account::Account;
use icrc_ledger_types::icrc107::schema::BTYPE_107;
use icrc_ledger_types::icrc123::schema::{
BTYPE_123_FREEZE_ACCOUNT, BTYPE_123_FREEZE_PRINCIPAL, BTYPE_123_UNFREEZE_ACCOUNT,
BTYPE_123_UNFREEZE_PRINCIPAL,
};
use icrc_ledger_types::icrc124::schema::{
BTYPE_124_DEACTIVATE, BTYPE_124_PAUSE, BTYPE_124_UNPAUSE,
};
Expand Down Expand Up @@ -470,7 +474,11 @@ pub fn update_account_balances(
}
crate::common::storage::types::IcrcOperation::Pause { .. }
| crate::common::storage::types::IcrcOperation::Unpause { .. }
| crate::common::storage::types::IcrcOperation::Deactivate { .. } => {
| crate::common::storage::types::IcrcOperation::Deactivate { .. }
| crate::common::storage::types::IcrcOperation::FreezeAccount { .. }
| crate::common::storage::types::IcrcOperation::UnfreezeAccount { .. }
| crate::common::storage::types::IcrcOperation::FreezePrincipal { .. }
| crate::common::storage::types::IcrcOperation::UnfreezePrincipal { .. } => {
// Does not affect balances
}
}
Expand Down Expand Up @@ -660,6 +668,58 @@ pub fn store_blocks(
None,
None,
),
crate::common::storage::types::IcrcOperation::FreezeAccount { .. } => (
BTYPE_123_FREEZE_ACCOUNT,
None,
None,
None,
None,
None,
None,
Nat::from(0_u64),
None,
None,
None,
),
crate::common::storage::types::IcrcOperation::UnfreezeAccount { .. } => (
BTYPE_123_UNFREEZE_ACCOUNT,
None,
None,
None,
None,
None,
None,
Nat::from(0_u64),
None,
None,
None,
),
crate::common::storage::types::IcrcOperation::FreezePrincipal { .. } => (
BTYPE_123_FREEZE_PRINCIPAL,
None,
None,
None,
None,
None,
None,
Nat::from(0_u64),
None,
None,
None,
),
crate::common::storage::types::IcrcOperation::UnfreezePrincipal { .. } => (
BTYPE_123_UNFREEZE_PRINCIPAL,
None,
None,
None,
None,
None,
None,
Nat::from(0_u64),
None,
None,
None,
),
};

// SQLite doesn't support unsigned 64-bit integers. We need to convert the timestamps to signed
Expand Down
Loading
Loading