Skip to content

Commit

Permalink
🔥 Remove enable/disable share button and update modal text
Browse files Browse the repository at this point in the history
  • Loading branch information
srod committed Dec 12, 2024
1 parent c698628 commit 2604187
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 58 deletions.
4 changes: 0 additions & 4 deletions sdk/core/src/clients/createIFrameFrakClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import type {
RpcResponse,
} from "../types/transport";
import { Deferred } from "../utils/Deferred";
import { enableButtonShare } from "../utils/buttonShare";
import {
decompressDataAndCheckHash,
hashAndCompressData,
Expand Down Expand Up @@ -187,9 +186,6 @@ export async function postConnectionSetup({
// Wait for the handler to be connected
await lifecycleManager.isConnected;

// Show the share button
enableButtonShare(config);

// Push raw CSS if needed
const pushCss = async () => {
const cssLink = config.metadata.css;
Expand Down
2 changes: 0 additions & 2 deletions sdk/core/src/types/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ export type FrakWalletSdkConfig = Readonly<{
name: string;
// Your app styles to skin modals / sso
css?: string;
// Your button to trigger the wallet share modal
buttonShare?: string;
};
// Your domain (will be retrieved automatically if not provided)
domain?: string;
Expand Down
46 changes: 0 additions & 46 deletions sdk/core/src/utils/buttonShare.ts

This file was deleted.

4 changes: 0 additions & 4 deletions sdk/core/src/utils/iframeHelper.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type { FrakWalletSdkConfig } from "../types";
import { disableButtonShare } from "./buttonShare";

/**
* Base props for the iframe
Expand Down Expand Up @@ -30,9 +29,6 @@ export function createIframe({
}: { walletBaseUrl?: string; config?: FrakWalletSdkConfig }): Promise<
HTMLIFrameElement | undefined
> {
// Hide the share button by default until the iframe is loaded and connected
disableButtonShare(config);

// Check if the iframe is already created
const alreadyCreatedIFrame = document.querySelector("#nexus-wallet");

Expand Down
4 changes: 2 additions & 2 deletions sdk/legacy/src/specifics/gapianne.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ function setConfig() {
},
};
window.FrakSetup.modalShareConfig = {
popupTitle: "Pr\xEAt(e) \xE0 r\xE9v\xE9ler un secret bien-\xEAtre ?",
text: "D\xE9couvre ce produit chez Gapianne",
popupTitle: "Prêt(e) à révéler un secret bien-être ?",
text: "Découvre ce produit chez Gapianne",
link: window.location.href,
};
}
Expand Down

0 comments on commit 2604187

Please sign in to comment.