Skip to content

Commit

Permalink
update version, change docs
Browse files Browse the repository at this point in the history
  • Loading branch information
rashgaroth committed Nov 15, 2022
1 parent f9c77d0 commit 06bb56e
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ const upbond = new Upbond(options);
```
- `buttonSize` (optional) : number, default is `56`
- `modalZIndex` (optional): number, default is `99999`
- `apiKey` (optional): string

**Examples**

Expand All @@ -54,9 +53,8 @@ import Upbond, { UPBOND_BUILD_ENV, BUTTON_POSITION_TYPE } from "@upbond/upbond-e
const upbond = new Upbond({
buttonPosition: BUTTON_POSITION_TYPE.BOTTOM_LEFT, // default: 'bottom-left'
buttonSize: 56,
modalZIndex: 150,
apiKey: '<your-api-key>'
buttonSize: 56, // optional
modalZIndex: 150, // optional
});
await upbond.init({
Expand Down Expand Up @@ -277,4 +275,4 @@ You can check this out [here](https://github.com/upbond/embed/tree/master/exampl
# Current version
version: v1.0.8
version: v1.0.9
6 changes: 3 additions & 3 deletions examples/react/src/lib/UpbondEmbed.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Upbond from "@upbond/upbond-embed";
import Upbond from "./upbond-embed/upbondEmbed.esm";
import Web3 from "web3";

class UpbondEmbed {
Expand All @@ -9,7 +9,7 @@ class UpbondEmbed {
web3 = null

// you can also using another envs.
env = "direct-test"
env = "development"

provider

Expand All @@ -28,7 +28,7 @@ class UpbondEmbed {
await this.upbond.init({
buildEnv: this.env,
isUsingDirect: true,
dappRedirectUri: window.location.origin
dappRedirectUri: window.location.origin,
})
this.initialized = true
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@upbond/upbond-embed",
"version": "1.0.8",
"version": "1.0.9",
"description": "Embed script for Upbond",
"main": "dist/upbondEmbed.cjs.js",
"module": "dist/upbondEmbed.esm.js",
Expand Down
8 changes: 5 additions & 3 deletions src/embed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ const UNSAFE_METHODS = [
if (upbondIframeHtml.relList && upbondIframeHtml.relList.supports) {
if (upbondIframeHtml.relList.supports("prefetch")) {
log.info("IFrame loaded");
// document.head.appendChild(upbondIframeHtml);
document.head.appendChild(upbondIframeHtml);
}
}
} catch (error) {
Expand Down Expand Up @@ -204,6 +204,8 @@ class Upbond {
this.useWalletConnect = useWalletConnect;
this.isCustomLogin = !!(loginConfig && Object.keys(loginConfig).length > 0) || !!(whiteLabel && Object.keys(whiteLabel).length > 0);

log.info("@customLogin?", this.isCustomLogin);

log.info(`Using custom login: ${this.isCustomLogin}`);
log.setDefaultLevel(logLevel);

Expand Down Expand Up @@ -429,7 +431,7 @@ class Upbond {
finalUrl.searchParams.append(x, params[x]);
});
finalUrl.hash = `#isCustomLogin=${this.isCustomLogin}`;

log.info(`loaded: ${finalUrl}`);
const walletWindow = new PopupHandler({ url: finalUrl, features: FEATURES_DEFAULT_WALLET_WINDOW });
walletWindow.open();
}
Expand Down Expand Up @@ -806,7 +808,7 @@ class Upbond {
const widgetStream = communicationMux.getStream("widget") as Substream;
widgetStream.on("data", (chunk) => {
const { data } = chunk;
// eslint-disable-next-line no-console

this._displayIframe(data);
});

Expand Down

0 comments on commit 06bb56e

Please sign in to comment.