Skip to content

Commit 3950993

Browse files
authored
Merge pull request #106 from lighthouse-web3/v0.2.9
Fix: build issue
2 parents 3ba4ab1 + a2abd9e commit 3950993

File tree

12 files changed

+15
-0
lines changed

12 files changed

+15
-0
lines changed

.github/workflows/node.js.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ jobs:
2727
- name: Install 🔧
2828
run: npm install
2929

30+
- name: Build 🔨
31+
run: npm run build
32+
3033
- name: Test 🚨
3134
run: npm test
3235
env:

src/Lighthouse/payPerDeal/fund/browser.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export default async (amount: number, network: string, token: string) => {
1010
if(!config) {
1111
throw new Error("Unsupported Network!!!")
1212
}
13+
//@ts-ignore
1314
const provider = new ethers.BrowserProvider((window as any).ethereum)
1415
const signer = await provider.getSigner()
1516
if(token.toLowerCase()==="native") {

src/Lighthouse/payPerDeal/fund/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import browser from './browser'
33

44
export default async (amount: number, network: string, token: string, privateKey?: string) => {
55
// Upload File to IPFS
6+
//@ts-ignore
67
if (typeof window === "undefined") {
78
return await node(amount, network, token, privateKey)
89
} else {

src/Lighthouse/payPerDeal/getPrice/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import web from './web'
33

44
export default async (pathOrSize: string|number|any, network: string, token?: string) => {
55
// Upload File to IPFS
6+
//@ts-ignore
67
if (typeof window === "undefined") {
78
return await node(pathOrSize, network, token)
89
} else {

src/Lighthouse/payPerDeal/oneTimeAuth/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import web from './web'
33

44
export default async (privateKey?: string) => {
55
// Upload File to IPFS
6+
//@ts-ignore
67
if (typeof window === "undefined") {
78
return await node(privateKey )
89
} else {

src/Lighthouse/payPerDeal/oneTimeAuth/web.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { lighthouseConfig } from '../../../lighthouse.config'
55

66
export default async (): Promise<string> => {
77
try {
8+
//@ts-ignore
89
const provider = new ethers.BrowserProvider((window as any).ethereum)
910
const signer = await provider.getSigner()
1011
const message = (await axios.get(

src/Lighthouse/upload/buffer/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ export default async (
66
apiKey: string
77
) => {
88
// Upload File to IPFS
9+
//@ts-ignore
910
if (typeof window === "undefined") {
1011
return await uploadBuffer(buffer, apiKey)
1112
} else {

src/Lighthouse/upload/files/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ async function uploadFiles(
2828
// Upload File to IPFS
2929

3030
if (multi) {
31+
//@ts-ignore
3132
if (typeof window === 'undefined') {
3233
return await uploadFile(path, apiKey, true, dealParameters)
3334
} else {
@@ -43,6 +44,7 @@ async function uploadFiles(
4344
)
4445
}
4546
} else {
47+
//@ts-ignore
4648
if (typeof window === 'undefined') {
4749
return await uploadFile(path, apiKey, false, dealParameters)
4850
} else {

src/Lighthouse/upload/text/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import uploadTextBrowser from './browser'
33

44
export default async (text: string, apiKey: string, name='text') => {
55
// Upload File to IPFS
6+
//@ts-ignore
67
if (typeof window === "undefined") {
78
return await uploadTextServer(text, apiKey, name)
89
} else {

src/Lighthouse/uploadEncrypted/decrypt/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ export default async (
77
mimeType = 'null'
88
) => {
99
// Upload File to IPFS
10+
//@ts-ignore
1011
if (typeof window === "undefined") {
1112
return await node(cid, fileEncryptionKey)
1213
} else {

0 commit comments

Comments
 (0)