Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add shx to support Windows builds. Fix build. #165

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
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: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@ dist/*
.DS_Store
yarn.lock
package-lock.json
*.mjs
*.cjs
/.yarn/
/.vscode/
8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
"author": "@zetamarkets",
"license": "Apache-2.0",
"scripts": {
"build": "cp -r ../../target/idl/zeta.json ./src/idl/zeta.json && cp -r ../../target/types/zeta.ts ./src/types/. && ./node_modules/.bin/tsc",
"docs": "typedoc --tsconfig ./tsconfig.json && cp ./logo.png ./docs/logo.png",
"build-no-idl": "./node_modules/.bin/tsc"
"build": "shx cp -r ../../target/idl/zeta.json ./src/idl/zeta.json && shx cp -r ../../target/types/zeta.ts ./src/types/. && tsc",
"docs": "typedoc --tsconfig ./tsconfig.json && shx cp ./logo.png ./docs/logo.png",
"build-no-idl": "tsc"
},
"dependencies": {
"@project-serum/anchor": "0.24.2",
Expand All @@ -19,6 +19,7 @@
"@solana/spl-token": "0.1.6",
"@solana/web3.js": "1.31.0",
"bs58": "^4.0.1",
"buffer-layout": "^1.2.2",
"lodash": "^4.17.21",
"ts-node": "^10.7.0",
"typescript": "^4.4.2"
Expand All @@ -27,6 +28,7 @@
"@types/mocha": "^9.0.0",
"@types/node": "^16.11.12",
"mocha": "^9.1.1",
"shx": "^0.3.4",
"typedoc": "^0.22.10"
},
"resolutions": {
Expand Down
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@ export async function getTokenAccountInfo(

if (accountInfo.delegateOption === 0) {
accountInfo.delegate = null;
accountInfo.delegatedAmount = new u64(0);
accountInfo.delegatedAmount = 0;
} else {
accountInfo.delegate = new PublicKey(accountInfo.delegate);
accountInfo.delegatedAmount = u64.fromBuffer(accountInfo.delegatedAmount);
Expand Down