Skip to content

Commit

Permalink
Increasing the approval amount and updating to use latest version of …
Browse files Browse the repository at this point in the history
…uploader.js
  • Loading branch information
jamiehewitt15 committed Oct 19, 2023
1 parent 2b464d8 commit 69e3e4d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"dependencies": {
"@ethersproject/units": "^5.7.0",
"@oceanprotocol/typographies": "^0.1.0",
"@oceanprotocol/uploader": "^0.0.2-alpha.31",
"@oceanprotocol/uploader": "^0.0.2-alpha.32",
"@tippyjs/react": "^4.2.6",
"@types/react": "^17.0.59",
"ajv": "^8.12.0",
Expand Down
8 changes: 7 additions & 1 deletion src/components/TabsFile/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ export default function TabsFile({
const [uploadStatusResponse, setUploadStatusResponse] = useState<any>('')
const [ddoLink, setDDOLink] = useState('')

console.log('quote tokenAmount', quote)
const mockedDataHistory = [
{
quoteId: '93254d6a389ca6eb07ff548810b27eb1',
Expand Down Expand Up @@ -218,6 +219,8 @@ export default function TabsFile({
})
console.log('Quote result:', quoteResult)
setQuote(quoteResult)
console.log('quoteResult.tokenAmount', quoteResult.tokenAmount)
console.log('quote tokenAmount', quote)

// Check if user has wrapped matic in their wallet
const quotePrice = BigInt(quoteResult.tokenAmount)
Expand Down Expand Up @@ -286,10 +289,12 @@ export default function TabsFile({
}: any) => {
try {
console.log('uploading: ', { quoteId, payment, quoteFee, files, type })
console.log('String(quoteFee)', String(quoteFee))
const newQuoteFee = BigInt(quoteFee) + BigInt(3000000000000000)
const quoteAndUploadResult: any = await uploaderClient.uploadBrowser(
quoteId,
payment,
String(quoteFee),
String(newQuoteFee),
files as FileList,
type
)
Expand Down Expand Up @@ -357,6 +362,7 @@ export default function TabsFile({
case 'upload':
setUploadIsLoading(true)
// Upload File
console.log('String(quote.tokenAmount)', String(quote.tokenAmount))
await getUpload({
quoteId: quote.quoteId,
payment: quote.tokenAddress,
Expand Down

0 comments on commit 69e3e4d

Please sign in to comment.