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

fix: convert js example to ts string export #13756

Merged
merged 1 commit into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
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
7 changes: 4 additions & 3 deletions src/data/CreateWallet.js → src/data/CreateWallet.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
// ? Should this become a `*.ts` file?
// eslint-disable-next-line @typescript-eslint/no-var-requires
const ethers = require("ethers")
const createWallet = `const ethers = require("ethers")

// Create a wallet instance from a mnemonic...
const mnemonic =
Expand Down Expand Up @@ -51,3 +49,6 @@ wallet.sendTransaction(tx)
// https://github.com/ethers-io/ethers.js/blob/master/docs/v5/api/signer/README.md#methods
// Content is licensed under the Creative Commons License:
// https://choosealicense.com/licenses/cc-by-4.0/
`

export default createWallet
3 changes: 2 additions & 1 deletion src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,10 @@ import {
isLangRightToLeft,
} from "@/lib/utils/translations"

import CreateWalletContent from "@/data/CreateWallet"

import { BASE_TIME_UNIT } from "@/lib/constants"

import CreateWalletContent from "!!raw-loader!@/data/CreateWallet.js"
import SimpleDomainRegistryContent from "!!raw-loader!@/data/SimpleDomainRegistry.sol"
import SimpleTokenContent from "!!raw-loader!@/data/SimpleToken.sol"
import SimpleWalletContent from "!!raw-loader!@/data/SimpleWallet.sol"
Expand Down
Loading