Compare commits

...
Author SHA1 Message Date
github-actions[bot]GitHubgithub-actions[bot] <github-actions[bot]@users.noreply.github.com>
c5959fbd52 Version Packages (#689)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2023-03-07 22:37:23 -08:00
Adam MajmudarandGitHub 68d52f99b3 [SDK] Poll if transaction isn't found yet (#688) 2023-03-08 06:17:23 +00:00
9efeba38f0 [Auth] Include credentials on initial login request, [react] web3button type (#684)
Co-authored-by: Manan Tank <[email protected]>
Co-authored-by: Jonas Daniels <[email protected]>
2023-03-08 06:10:39 +00:00
16 changed files with 73 additions and 8 deletions
+7
View File
@@ -1,5 +1,12 @@
# thirdweb
## 0.10.1
### Patch Changes
- Updated dependencies [[`68d52f99`](https://github.com/thirdweb-dev/js/commit/68d52f99b36c6744e45872d0bdebafbbf7d09b59)]:
- @thirdweb-dev/sdk@3.10.1
## 0.10.0
### Minor Changes
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "thirdweb",
"main": "dist/cli/index.js",
"version": "0.10.0",
"version": "0.10.1",
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/cli",
"author": "thirdweb eng <[email protected]>",
"license": "Apache-2.0",
+6
View File
@@ -1,5 +1,11 @@
# @thirdweb-dev/react-core
## 3.10.1
### Patch Changes
- [#684](https://github.com/thirdweb-dev/js/pull/684) [`9efeba38`](https://github.com/thirdweb-dev/js/commit/9efeba38f06783b78e2c947ad878350173f4e07a) Thanks [@adam-maj](https://github.com/adam-maj)! - Update auth hooks to include credentials on login
## 3.10.0
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/react-core",
"version": "3.10.0",
"version": "3.10.1",
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react-core",
"author": "thirdweb eng <[email protected]>",
"license": "Apache-2.0",
@@ -35,6 +35,7 @@ export function useLogin() {
"Content-Type": "application/json",
},
body: JSON.stringify({ payload }),
credentials: "include",
});
if (!res.ok) {
@@ -47,6 +47,7 @@ export function useLogin() {
"Content-Type": "application/json",
},
body: JSON.stringify({ payload }),
credentials: "include",
});
if (!res.ok) {
+8
View File
@@ -1,5 +1,13 @@
# @thirdweb-dev/react-native
## 0.1.7
### Patch Changes
- Updated dependencies [[`68d52f99`](https://github.com/thirdweb-dev/js/commit/68d52f99b36c6744e45872d0bdebafbbf7d09b59), [`9efeba38`](https://github.com/thirdweb-dev/js/commit/9efeba38f06783b78e2c947ad878350173f4e07a)]:
- @thirdweb-dev/sdk@3.10.1
- @thirdweb-dev/react-core@3.10.1
## 0.1.6
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/react-native",
"version": "0.1.6",
"version": "0.1.7",
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react-native",
"author": "thirdweb eng <[email protected]>",
"license": "Apache-2.0",
+7
View File
@@ -1,5 +1,12 @@
# @thirdweb-dev/react
## 3.10.1
### Patch Changes
- Updated dependencies [[`9efeba38`](https://github.com/thirdweb-dev/js/commit/9efeba38f06783b78e2c947ad878350173f4e07a)]:
- @thirdweb-dev/react-core@3.10.1
## 3.10.0
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/react",
"version": "3.10.0",
"version": "3.10.1",
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/react",
"author": "thirdweb eng <[email protected]>",
"license": "Apache-2.0",
@@ -35,6 +35,7 @@ interface Web3ButtonProps<TActionFn extends ActionFn>
isDisabled?: boolean;
// the fn to execute
action: TActionFn;
type?: "button" | "submit" | "reset";
}
/**
@@ -68,6 +69,7 @@ export const Web3Button = <TAction extends ActionFn>({
children,
action,
className,
type,
...themeProps
}: PropsWithChildren<Web3ButtonProps<TAction>>) => {
const address = useAddress();
@@ -137,6 +139,7 @@ export const Web3Button = <TAction extends ActionFn>({
return (
<ThemeProvider {...themeProps}>
<Button
type={type}
className={className}
style={{ height: "50px", minWidth: "200px", width: "100%" }}
isLoading={mutation.isLoading || !contract}
+6
View File
@@ -1,5 +1,11 @@
# @thirdweb-dev/sdk
## 3.10.1
### Patch Changes
- [#688](https://github.com/thirdweb-dev/js/pull/688) [`68d52f99`](https://github.com/thirdweb-dev/js/commit/68d52f99b36c6744e45872d0bdebafbbf7d09b59) Thanks [@adam-maj](https://github.com/adam-maj)! - Poll if transaction can't be found yet on gasless
## 3.10.0
### Minor Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/sdk",
"version": "3.10.0",
"version": "3.10.1",
"description": "The main thirdweb SDK.",
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/sdk",
"license": "Apache-2.0",
@@ -463,8 +463,27 @@ export class Transaction<TResult = TransactionResult> {
this.gaslessOptions,
);
const sentTx = await this.provider.getTransaction(txHash);
sentTx.wait = async () => this.provider.waitForTransaction(txHash);
// Need to poll here because ethers.provider.getTransaction lies about the type
// It can actually return null, which can happen if we're still in gasless API send queue
let sentTx;
let iteration = 1;
while (!sentTx) {
sentTx = await this.provider.getTransaction(txHash);
// Exponential (ish) backoff for polling
if (!sentTx) {
await new Promise((resolve) =>
setTimeout(resolve, Math.min(iteration * 1000, 10000)),
);
iteration++;
}
// Timeout if we still don't have it after a while
if (iteration > 20) {
throw new Error(`Unable to retrieve transaction with hash ${txHash}`);
}
}
return sentTx;
}
+7
View File
@@ -1,5 +1,12 @@
# @thirdweb-dev/unity-js-bridge
## 0.2.15
### Patch Changes
- Updated dependencies [[`68d52f99`](https://github.com/thirdweb-dev/js/commit/68d52f99b36c6744e45872d0bdebafbbf7d09b59)]:
- @thirdweb-dev/sdk@3.10.1
## 0.2.14
### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@thirdweb-dev/unity-js-bridge",
"version": "0.2.14",
"version": "0.2.15",
"main": "dist/thirdweb-unity-bridge.js",
"repository": "https://github.com/thirdweb-dev/js/tree/main/packages/unity-js-bridge",
"license": "Apache-2.0",