From 578f55e8ac2b98360126f6b569a35fa3c9b955de Mon Sep 17 00:00:00 2001 From: Mouhamed Essam Date: Tue, 27 Dec 2022 19:29:43 +0200 Subject: [PATCH] use remove function instead of removeSubscription :bug: (#365) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 👍 Done, but it might be a while before this gets released in an official version. Feel free to install against the commit or master branch. (and check out the README on front page) --- js/PaymentRequest/index.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/js/PaymentRequest/index.js b/js/PaymentRequest/index.js index cd05a4c8..b0e88f20 100644 --- a/js/PaymentRequest/index.js +++ b/js/PaymentRequest/index.js @@ -409,16 +409,12 @@ export default class PaymentRequest { _removeEventListeners() { // Internal Events - DeviceEventEmitter.removeSubscription(this._userDismissSubscription); - DeviceEventEmitter.removeSubscription(this._userAcceptSubscription); + this._userDismissSubscription.remove() + this._userAcceptSubscription.remove() if (IS_IOS) { - DeviceEventEmitter.removeSubscription( - this._shippingAddressChangeSubscription - ); - DeviceEventEmitter.removeSubscription( - this._shippingOptionChangeSubscription - ); + this._shippingAddressChangeSubscription.remove() + this._shippingOptionChangeSubscription.remove() } }