Skip to content

Commit 9e47ff5

Browse files
committed
🐛 Make UX better w/ wallet connection issues
1 parent 19466e6 commit 9e47ff5

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

public/js/connect.jsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,8 @@ export const WPRainbowConnect = () => {
140140
<React.Fragment>
141141
<button
142142
className="button button-secondary button-hero"
143-
onClick={state.address ? openAccountModal : signIn}
143+
onClick={state.address || state.loading ? openAccountModal : signIn}
144144
type="button"
145-
disabled={state.loading}
146145
style={{ width: "100%" }}
147146
>
148147
{state.address
@@ -159,7 +158,12 @@ export const WPRainbowConnect = () => {
159158
<React.Fragment>
160159
<button
161160
className="button button-secondary button-hero"
162-
onClick={openConnectModal}
161+
onClick={() => {
162+
// Make sure we don't have an active signing attempt.
163+
setState({});
164+
setTriggeredLogin(false);
165+
openConnectModal();
166+
}}
163167
style={{ width: "100%" }}
164168
type="button"
165169
>

wp-rainbow.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
/**
33
* Plugin Name: WP Rainbow
4-
* Version: 0.0.2
4+
* Version: 0.0.3
55
*
66
* @package WP_Rainbow
77
*/
@@ -13,7 +13,7 @@
1313
*
1414
* @var string
1515
*/
16-
define( 'WP_RAINBOW_ASSETS_VERSION', '0.0.2' );
16+
define( 'WP_RAINBOW_ASSETS_VERSION', '0.0.3' );
1717

1818
// Include the autoloader.
1919
add_action(

0 commit comments

Comments
 (0)