Skip to content

Commit

Permalink
fix(sui): view function should include friend (#90)
Browse files Browse the repository at this point in the history
  • Loading branch information
zfy0701 authored May 7, 2024
1 parent 5bd1c35 commit e9e5fae
Show file tree
Hide file tree
Showing 3 changed files with 367 additions and 23 deletions.
4 changes: 2 additions & 2 deletions packages/sui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
},
"types": "./dist/cjs/index.d.ts",
"dependencies": {
"@mysten/bcs": "^0.11.0",
"@mysten/sui.js": "~0.51.0",
"@mysten/bcs": "^0.11.1",
"@mysten/sui.js": "~0.52.0",
"@typemove/move": "workspace:*",
"chalk": "^5.3.0",
"commander": "^12.0.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/sui/src/codegen/codegen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export class SuiCodegen extends AbstractCodegen<
}

protected generateViewFunction(module: InternalMoveModule, func: InternalMoveFunction): string {
if (func.visibility !== InternalMoveFunctionVisibility.PUBLIC) {
if (func.visibility === InternalMoveFunctionVisibility.PRIVATE) {
return ''
}
const genericString = this.generateFunctionTypeParameters(func)
Expand Down Expand Up @@ -178,7 +178,7 @@ export class SuiCodegen extends AbstractCodegen<
}

protected generateBuilderForFunction(module: InternalMoveModule, func: InternalMoveFunction): string {
if (func.visibility !== InternalMoveFunctionVisibility.PUBLIC && func.isEntry !== true) {
if (func.visibility === InternalMoveFunctionVisibility.PRIVATE && func.isEntry !== true) {
return ''
}

Expand Down
Loading

0 comments on commit e9e5fae

Please sign in to comment.