Skip to content

Commit

Permalink
Merge pull request #221 from bonnie57/dev_v1.1
Browse files Browse the repository at this point in the history
Dev v1.1
  • Loading branch information
bonnie57 authored Nov 21, 2024
2 parents a807df4 + ed32bde commit d046bb6
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 20 deletions.
2 changes: 1 addition & 1 deletion packages/core-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bonnie37",
"version": "1.1.0",
"version": "1.1.1",
"main": "dist/bonnie37.cjs.js",
"module": "dist/bonnie37.esm.js",
"exports": {
Expand Down
2 changes: 1 addition & 1 deletion packages/react-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
},
"license": "MIT",
"dependencies": {
"@story-protocol/core-sdk": "1.0.0-rc.22",
"@story-protocol/core-sdk": "1.1.0-stable",
"react": "^18.3.1",
"viem": "^2.8.12"
},
Expand Down
15 changes: 8 additions & 7 deletions packages/react-sdk/src/resources/useIpAccount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
IPAccountExecuteWithSigRequest,
IPAccountExecuteWithSigResponse,
IpAccountStateResponse,
TokenResponse,
} from "@story-protocol/core-sdk";
import { Address } from "viem";
import { useState } from "react";
Expand Down Expand Up @@ -86,20 +87,20 @@ const useIpAccount = () => {
* Returns the identifier of the non-fungible token which owns the account
* @returns A Promise that resolves to an object containing the chain ID, token contract address, and token ID.
*/
// const getToken = withLoadingErrorHandling<Address, TokenResponse>(
// "getToken",
// client.ipAccount.getToken.bind(client.ipAccount),
// setLoadings,
// setErrors
// );
const getToken = withLoadingErrorHandling<Address, TokenResponse>(
"getToken",
client.ipAccount.getToken.bind(client.ipAccount),
setLoadings,
setErrors
);

return {
loadings,
errors,
execute,
executeWithSig,
getIpAccountNonce,
// getToken,
getToken,
};
};
export default useIpAccount;
21 changes: 11 additions & 10 deletions packages/react-sdk/src/resources/useLicense.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {
RegisterPILTermsRequest,
RegisterPILResponse,
RegisterNonComSocialRemixingPILRequest,
RegisterCommercialUsePILRequest,
Expand Down Expand Up @@ -60,15 +61,15 @@ const useLicense = () => {
* @returns A Promise that resolves to an object containing the optional transaction hash, optional transaction encodedTxData and optional license terms Id.
* @emits LicenseTermsRegistered (licenseTermsId, licenseTemplate, licenseTerms);
*/
// const registerPILTerms = withLoadingErrorHandling<
// RegisterPILTermsRequest,
// RegisterPILResponse
// >(
// "registerPILTerms",
// client.license.registerPILTerms.bind(client.license),
// setLoadings,
// setErrors
// );
const registerPILTerms = withLoadingErrorHandling<
RegisterPILTermsRequest,
RegisterPILResponse
>(
"registerPILTerms",
client.license.registerPILTerms.bind(client.license),
setLoadings,
setErrors
);

/**
* Convenient function to register a PIL non commercial social remix license to the registry
Expand Down Expand Up @@ -195,7 +196,7 @@ const useLicense = () => {
return {
loadings,
errors,
// registerPILTerms,
registerPILTerms,
registerNonComSocialRemixingPIL,
registerCommercialUsePIL,
registerCommercialRemixPIL,
Expand Down
17 changes: 16 additions & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d046bb6

Please sign in to comment.