diff --git a/js-miniapp-sample/src/services/message/actions.js b/js-miniapp-sample/src/services/message/actions.js index fbe971dcc..e8dde33d1 100644 --- a/js-miniapp-sample/src/services/message/actions.js +++ b/js-miniapp-sample/src/services/message/actions.js @@ -27,13 +27,6 @@ const getMessageTypeList = (): SetMessageTypeAction => { }; }; -const permissionsList = [ - { - name: CustomPermissionName.SEND_MESSAGE, - description: 'We would like to send message from this mini app.', - }, -]; - const sendMessageToContact = ( image: String, text: String, @@ -61,6 +54,12 @@ const sendMessageToContactId = ( action: String ): Function => { return async (dispatch) => { + const permissionsList = [ + { + name: CustomPermissionName.SEND_MESSAGE, + description: 'We would like to send message from this mini app.', + }, + ]; const promise = MiniApp.requestCustomPermissions(permissionsList).then( (permissions) => { return permissions[0].status === CustomPermissionStatus.ALLOWED; diff --git a/js-miniapp-sdk/package.json b/js-miniapp-sdk/package.json index dd8e3978a..69ce675f3 100644 --- a/js-miniapp-sdk/package.json +++ b/js-miniapp-sdk/package.json @@ -7,7 +7,7 @@ "module": "build/js-miniapp-sdk/src/index.js", "types": "build/js-miniapp-sdk/src/index.d.ts", "dependencies": { - "libbase64": "^1.2.1" + "libbase64": "1.2.1" }, "devDependencies": { "@istanbuljs/nyc-config-typescript": "^1.0.2",