Skip to content

Commit

Permalink
updates smart contract wallet message in connect modal (openlawteam#551)
Browse files Browse the repository at this point in the history
  • Loading branch information
jtrein authored Apr 4, 2022
1 parent 3b9c8fd commit 7546870
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 8 deletions.
16 changes: 12 additions & 4 deletions src/GlobalConnectWalletModal.unit.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,9 @@ describe('GlobalConnectWalletModal unit tests', () => {
// Assert modal open
await waitFor(() => {
expect(
screen.getByText(/smart contract wallets are not currently supported/i)
screen.getByText(
/smart contract wallets are not generally supported for features like off-chain voting/i
)
).toBeInTheDocument();

expect(screen.getByText(/^connect wallet$/i)).toBeInTheDocument();
Expand Down Expand Up @@ -260,7 +262,9 @@ describe('GlobalConnectWalletModal unit tests', () => {
// Assert modal open
await waitFor(() => {
expect(
screen.getByText(/smart contract wallets are not currently supported/i)
screen.getByText(
/smart contract wallets are not generally supported for features like off-chain voting/i
)
).toBeInTheDocument();

expect(screen.getByText(/^connect wallet$/i)).toBeInTheDocument();
Expand All @@ -278,7 +282,9 @@ describe('GlobalConnectWalletModal unit tests', () => {
// Assert modal closed
await waitFor(() => {
expect(() =>
screen.getByText(/smart contract wallets are not currently supported/i)
screen.getByText(
/smart contract wallets are not generally supported for features like off-chain voting/i
)
).toThrow();
});

Expand All @@ -290,7 +296,9 @@ describe('GlobalConnectWalletModal unit tests', () => {
// Assert modal open
await waitFor(() => {
expect(
screen.getByText(/smart contract wallets are not currently supported/i)
screen.getByText(
/smart contract wallets are not generally supported for features like off-chain voting/i
)
).toBeInTheDocument();
});
});
Expand Down
5 changes: 3 additions & 2 deletions src/components/web3/ConnectWalletModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,10 @@ export default function ConnectWalletModal(
) : null;

return (
<p className="error-message">
<p>
<small>
Smart contract wallets are not currently supported. {maybeMemberText}
Smart contract wallets are not generally supported for features like
off-chain voting. {maybeMemberText}
</small>
</p>
);
Expand Down
6 changes: 4 additions & 2 deletions src/components/web3/ConnectWalletModal.unit.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,9 @@ describe('ConnectWalletModal unit tests', () => {
// Assert modal open
await waitFor(() => {
expect(
screen.getByText(/smart contract wallets are not currently supported/i)
screen.getByText(
/smart contract wallets are not generally supported for features like off-chain voting/i
)
).toBeInTheDocument();

expect(screen.getByText(/^connect wallet$/i)).toBeInTheDocument();
Expand Down Expand Up @@ -632,7 +634,7 @@ describe('ConnectWalletModal unit tests', () => {
await waitFor(() => {
expect(
screen.getByText(
/smart contract wallets are not currently supported\. as a member, you can/i
/smart contract wallets are not generally supported for features like off-chain voting\. as a member, you can/i
)
).toBeInTheDocument();

Expand Down

0 comments on commit 7546870

Please sign in to comment.