Skip to content

Commit

Permalink
fixing time and trap APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
lastmjs committed Jan 17, 2025
1 parent bcb5858 commit ea33d21
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/stable/test/property/ic_api/time/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

import {
acceptMessage,
// argDataRaw,
IDL,
// init,
inspectMessage,
methodName,
// msgArgData,
// postUpgrade,
// preUpgrade,
query,
Expand Down
4 changes: 2 additions & 2 deletions examples/stable/test/property/ic_api/trap/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import {
acceptMessage,
argDataRaw,
IDL,
inspectMessage,
methodName,
msgArgData,
query,
trap,
update
Expand All @@ -13,7 +13,7 @@ export default class {
@inspectMessage
inspectMessage(): void {
if (methodName() === 'inspectMessageTrap') {
const message = IDL.decode([IDL.Text], argDataRaw())[0] as string;
const message = IDL.decode([IDL.Text], msgArgData())[0] as string;

trap(`trap proptest message: ${message}`);
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/stable/canister_methods/inspect_message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Context, decoratorArgumentsHandler, OriginalMethod } from '.';
*
* The `inspectMessage` entry point will be called just before a call to an `update` entry point.
*
* Arguments to the `update` entry point can be accessed using `argDataRaw`.
* Arguments to the `update` entry point can be accessed using `msgArgData`.
*
* Only one `inspectMessage` method is allowed per canister.
*
Expand Down

0 comments on commit ea33d21

Please sign in to comment.