Skip to content

Commit 4a0dc8c

Browse files
committed
Deprecate linkKey config param
1 parent 7d17239 commit 4a0dc8c

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

android/src/main/java/com/reactlibrary/ARArgyleSdkModule.kt

-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ class ARArgyleSdkModule(context: ReactApplicationContext) : ReactContextBaseJava
2424
@ReactMethod
2525
fun start(config: ReadableMap) {
2626
val nativeConfig = LinkConfig(
27-
linkKey = config.getString("linkKey")!!,
2827
userToken = config.getString("userToken")!!,
2928
sandbox = config.getBoolean("sandbox")
3029
)

example/src/LinkExample.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ export const LinkExample = (): JSX.Element => {
1515

1616
const start = () => {
1717
const config = {
18-
linkKey: 'LINK_KEY',
1918
userToken: 'USER_TOKEN',
2019
sandbox: true,
2120
onAccountCreated: (response: AccountCallbackPayload) =>

index.d.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ type TokenExpiredCallback = (updateToken: (token: string) => void) => void
2323
type FormCallback = (payload: FormCallbackPayload) => void
2424

2525
export interface LinkConfig {
26-
linkKey: string
26+
/**
27+
* @deprecated The use of `linkKey` has been discontinued. `LinkConfig` can now be initialized without it.
28+
*/
29+
linkKey?: string
2730
sandbox: boolean
2831
userToken: string
2932
flowId?: string

index.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ export class ArgyleLink {
2323
static listeners = {}
2424

2525
static start(config) {
26-
const {linkKey, sandbox, userToken} = config
26+
const {sandbox, userToken} = config
2727

28-
if (linkKey === undefined || sandbox === undefined || userToken === undefined) {
29-
throw '[ArgyleLink] linkKey, userToken and sandbox must be defined.'
28+
if (sandbox === undefined || userToken === undefined) {
29+
throw '[ArgyleLink] userToken and sandbox must be defined.'
3030
}
3131

3232
callbacks.forEach(name => {

ios/ARArgyleSdk.swift

-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ class ARArgyleSdk: RCTEventEmitter {
4040
func start(config: NSDictionary) {
4141
DispatchQueue.main.sync {
4242
var nativeConfig = LinkConfig(
43-
linkKey: config.value(forKey: "linkKey") as! String,
4443
userToken: config.value(forKey: "userToken") as! String,
4544
sandbox: config.value(forKey: "sandbox") as! Bool
4645
)

0 commit comments

Comments
 (0)