Skip to content

Commit

Permalink
Dev (#76)
Browse files Browse the repository at this point in the history
* temp fix ios

* undo

* remove temp fix for ios

* undo temp ios fix
  • Loading branch information
andy-t-wang authored Sep 30, 2024
1 parent 44ef5bb commit d8aba1e
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 35 deletions.
68 changes: 34 additions & 34 deletions src/minikit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,12 +178,12 @@ export class MiniKit {

// If commands are missing we will install minikit regardless
if (!this.commandsValid(window.WorldApp.supported_commands)) {
// return {
// success: false,
// errorCode: MiniKitInstallErrorCodes.AppOutOfDate,
// errorMessage:
// MiniKitInstallErrorMessage[MiniKitInstallErrorCodes.AppOutOfDate],
// };
return {
success: false,
errorCode: MiniKitInstallErrorCodes.AppOutOfDate,
errorMessage:
MiniKitInstallErrorMessage[MiniKitInstallErrorCodes.AppOutOfDate],
};
}

return { success: true };
Expand Down Expand Up @@ -321,16 +321,16 @@ export class MiniKit {
sendTransaction: (
payload: SendTransactionInput
): SendTransactionPayload | null => {
// if (
// typeof window === "undefined" ||
// !this.isCommandAvailable[Command.SendTransaction]
// ) {
// console.error(
// "'sendTransaction' command is unavailable. Check MiniKit.install() or update the app version"
// );
if (
typeof window === "undefined" ||
!this.isCommandAvailable[Command.SendTransaction]
) {
console.error(
"'sendTransaction' command is unavailable. Check MiniKit.install() or update the app version"
);

// return null;
// }
return null;
}

sendMiniKitEvent<WebViewBasePayload>({
command: Command.SendTransaction,
Expand All @@ -342,16 +342,16 @@ export class MiniKit {
},

signMessage: (payload: SignMessageInput): SignMessagePayload | null => {
// if (
// typeof window === "undefined" ||
// !this.isCommandAvailable[Command.SignMessage]
// ) {
// console.error(
// "'signMessage' command is unavailable. Check MiniKit.install() or update the app version"
// );
if (
typeof window === "undefined" ||
!this.isCommandAvailable[Command.SignMessage]
) {
console.error(
"'signMessage' command is unavailable. Check MiniKit.install() or update the app version"
);

// return null;
// }
return null;
}

sendMiniKitEvent<WebViewBasePayload>({
command: Command.SignMessage,
Expand All @@ -365,16 +365,16 @@ export class MiniKit {
signTypedData: (
payload: SignTypedDataInput
): SignTypedDataPayload | null => {
// if (
// typeof window === "undefined" ||
// !this.isCommandAvailable[Command.SignTypedData]
// ) {
// console.error(
// "'signTypedData' command is unavailable. Check MiniKit.install() or update the app version"
// );

// return null;
// }
if (
typeof window === "undefined" ||
!this.isCommandAvailable[Command.SignTypedData]
) {
console.error(
"'signTypedData' command is unavailable. Check MiniKit.install() or update the app version"
);

return null;
}

sendMiniKitEvent<WebViewBasePayload>({
command: Command.SignTypedData,
Expand Down
2 changes: 1 addition & 1 deletion src/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@worldcoin/minikit-js",
"version": "0.0.35-internal-alpha-temp-fix",
"version": "0.0.36-internal-alpha",
"homepage": "https://docs.worldcoin.org/id/minikit",
"description": "Internal Alpha: Mini-kit JS is a lightweight sdk for building mini-apps compatible with World App",
"license": "MIT",
Expand Down

0 comments on commit d8aba1e

Please sign in to comment.