// Copyright © 2022 Olo Inc. All rights reserved. // This software is made available under the Olo Pay SDK License (See LICENSE.md file) package com.olopaysdkreactnative.extensions import com.facebook.react.bridge.Arguments import com.facebook.react.bridge.ReadableMap import com.olo.olopay.exceptions.GooglePayException import com.olopaysdkreactnative.data.DataKeys fun GooglePayException.toMap(): ReadableMap { val data = Arguments.createMap() data.putString(DataKeys.GPayErrorMessageKey, this.message) data.putString(DataKeys.GPayErrorTypeKey, this.errorType.toString()) data.putString(DataKeys.DigitalWalletTypeKey, DataKeys.DigitalWalletTypeValue) return data }