Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions development/utils.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
import { Alert, Linking } from 'react-native';
import { Currency, DynamicMultiSplitProps, PaymentChannels, PaystackParams, PaystackTransactionResponse } from './types';

/**
* Whether a navigation URL should be handed off to the OS instead of being
* loaded inside the checkout WebView. String matchers match by prefix;
* RegExp matchers use `.test(url)`.
*/
export const shouldHandleExternally = (
url: string,
hosts: Array<string | RegExp>
Expand All @@ -15,10 +10,6 @@ export const shouldHandleExternally = (
typeof matcher === 'string' ? url.indexOf(matcher) === 0 : matcher.test(url)
);

/**
* Hand a URL off to the OS. Checks `Linking.canOpenURL` first so we don't
* attempt to open a URL no installed app can handle, and swallows any error.
*/
export const openExternalUrl = async (url: string, debug = false): Promise<void> => {
try {
const supported = await Linking.canOpenURL(url);
Expand Down
Loading