diff --git a/js-miniapp-bridge/src/modules/miniapp-preferences.ts b/js-miniapp-bridge/src/modules/miniapp-preferences.ts index dadecfa9..f6288f02 100644 --- a/js-miniapp-bridge/src/modules/miniapp-preferences.ts +++ b/js-miniapp-bridge/src/modules/miniapp-preferences.ts @@ -19,7 +19,7 @@ export class MiniAppPreferences { set(key: string, value: string) { return new Promise((resolve, reject) => { return this.executor.exec( - 'setPreference', + 'setMiniAppPreference', { preferenceKey: key, preferenceValue: value }, response => { resolve(MiniAppBridgeUtils.BooleanValue(response)); @@ -37,7 +37,7 @@ export class MiniAppPreferences { get(key: string) { return new Promise((resolve, reject) => { return this.executor.exec( - 'getPreference', + 'getMiniAppPreference', { preferenceKey: key }, response => { resolve(response); @@ -55,7 +55,7 @@ export class MiniAppPreferences { remove(key: string) { return new Promise((resolve, reject) => { return this.executor.exec( - 'getPreference', + 'removeMiniAppPreference', { preferenceKey: key }, response => { resolve(MiniAppBridgeUtils.BooleanValue(response)); diff --git a/js-miniapp-sdk/README.md b/js-miniapp-sdk/README.md index dd1746b4..befb0e3d 100644 --- a/js-miniapp-sdk/README.md +++ b/js-miniapp-sdk/README.md @@ -1228,7 +1228,7 @@ import MiniApp from 'js-miniapp-sdk'; ## MiniApp storage using Key/Value Available from v1.20.0 -[Secure storage](#secure-storage) uses database for storing any data from MiniApp. It is recommended for MiniApps that wants to store huge data. +We already have a [Secure storage](#secure-storage) that uses database for storing any data from MiniApp. It is recommended for MiniApps that wants to store huge data. If MiniApp wants to use any storage that is lightweight, then they can use the following interfaces. Android uses Shared Preferences and iOS uses UserDefaults for the interfaces below,