Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v1.4.2 #176

Merged
merged 11 commits into from
Feb 19, 2025
28 changes: 15 additions & 13 deletions src/App.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,27 @@ import {PeraWalletSignTxnModal} from "./modal/sign-txn/PeraWalletSignTxnModal";

import "./util/screen/setDynamicVhValue";

window.customElements.define("pera-wallet-connect-modal", PeraWalletConnectModal);
window.customElements.define(
"pera-wallet-modal-desktop-mode",
PeraWalletModalDesktopMode
);
window.customElements.define("pera-wallet-modal-header", PeraWalletModalHeader);
window.customElements.define(
function defineCustomElement(name: string, element: CustomElementConstructor) {
if (!window.customElements.get(name)) {
window.customElements.define(name, element);
}
}
defineCustomElement("pera-wallet-connect-modal", PeraWalletConnectModal);
defineCustomElement("pera-wallet-modal-desktop-mode", PeraWalletModalDesktopMode);
defineCustomElement("pera-wallet-modal-header", PeraWalletModalHeader);
defineCustomElement(
"pera-wallet-modal-touch-screen-mode",
PeraWalletModalTouchScreenMode
);
window.customElements.define("pera-wallet-redirect-modal", PeraWalletRedirectModal);
window.customElements.define(
defineCustomElement("pera-wallet-redirect-modal", PeraWalletRedirectModal);
defineCustomElement(
"pera-wallet-connect-modal-information-section",
PeraWalletConnectModalInformationSection
);
window.customElements.define(
defineCustomElement(
"pera-wallet-connect-modal-pending-message-section",
PeraWalletConnectModalPendingMessageSection
);
window.customElements.define("pera-wallet-sign-txn-toast", PeraWalletSignTxnToast);
window.customElements.define("pera-wallet-sign-txn-modal", PeraWalletSignTxnModal);
window.customElements.define("pera-wallet-download-qr-code", PeraWalletDownloadQRCode);
defineCustomElement("pera-wallet-sign-txn-toast", PeraWalletSignTxnToast);
defineCustomElement("pera-wallet-sign-txn-modal", PeraWalletSignTxnModal);
defineCustomElement("pera-wallet-download-qr-code", PeraWalletDownloadQRCode);
2 changes: 1 addition & 1 deletion src/modal/_pera-wallet-modal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

width: 100%;
max-width: unset;
height: calc(calc(100 * var(--vh)));
height: calc(100 * var(--pera-wallet-vh));

padding: 20px;

Expand Down
4 changes: 1 addition & 3 deletions src/util/peraWalletConstants.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import {isAndroid} from "./device/deviceUtils";

const PERA_WALLET_APP_DEEP_LINK = isAndroid() ? "algorand://" : "perawallet-wc://";
const PERA_WALLET_APP_DEEP_LINK = "perawallet-wc://";
const PERA_DOWNLOAD_URL = "https://perawallet.app/download/";

export interface PeraWebWalletURLs {
Expand Down
2 changes: 1 addition & 1 deletion src/util/screen/screenSizeUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function isXSmallScreen() {
function setVhVariable() {
// a vh unit is equal to 1% of the screen height
// eslint-disable-next-line no-magic-numbers
document.documentElement.style.setProperty("--vh", `${window.innerHeight * 0.01}px`);
document.documentElement.style.setProperty("--pera-wallet-vh", `${window.innerHeight * 0.01}px`);
}

export {isLargeScreen, isMediumScreen, isSmallScreen, isXSmallScreen, setVhVariable};