-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat/wt 1932 show bridge form (#1218)
Co-authored-by: Zach Couchman <[email protected]>
- Loading branch information
1 parent
e9017bf
commit 6caf39e
Showing
17 changed files
with
371 additions
and
182 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
packages/checkout/widgets-lib/src/lib/addressUtils.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { abbreviateAddress } from './addressUtils'; | ||
|
||
describe('addressUtils', () => { | ||
it('should abbrviate address to first 6 chars, ... then last 4 chars', () => { | ||
expect(abbreviateAddress('0x1234567890')).toBe('0x1234...7890'); | ||
}); | ||
|
||
it('should return empty string when no address provided', () => { | ||
expect(abbreviateAddress('')).toBe(''); | ||
}); | ||
|
||
it('should return empty string when undefined is passed', () => { | ||
expect(abbreviateAddress(undefined as any)).toBe(''); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export function abbreviateAddress(address: string) { | ||
if (!address) return ''; | ||
return address.substring(0, 6).concat('...').concat(address.substring(address.length - 4)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
274 changes: 170 additions & 104 deletions
274
packages/checkout/widgets-lib/src/widgets/x-bridge/XBridgeWidget.cy.tsx
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.