Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[core-v2.3.0-alpha.1] : Feature - Transaction notifications #1070

Merged
merged 124 commits into from
Jun 20, 2022
Merged
Show file tree
Hide file tree
Changes from 107 commits
Commits
Show all changes
124 commits
Select commit Hold shift + click to select a range
8941fcc
Initial Notify setup steps
Adamj1232 May 17, 2022
88be97f
Styling notification
Adamj1232 May 19, 2022
e3743fc
Styling getting closer
Adamj1232 May 19, 2022
777ffd7
Layout looking a lot better
Adamj1232 May 20, 2022
a8b77d9
Aniomations working properly for pending
Adamj1232 May 20, 2022
27f03ed
Updated cleanliness
Adamj1232 May 20, 2022
f51ba00
More updates and abstractions
Adamj1232 May 23, 2022
e75cabb
Demo stuff
Adamj1232 May 24, 2022
5c28c31
Merge in dev and update Notify, getting closer
Adamj1232 May 24, 2022
ac05485
Props passed in properly
Adamj1232 May 24, 2022
e7da8b6
Rename and refactors
Adamj1232 May 24, 2022
b0d901a
Notify into AC
Adamj1232 May 27, 2022
28ef295
Merge in dev
Adamj1232 May 29, 2022
03ff348
Cleanup and merge in develop
Adamj1232 May 29, 2022
f2e7133
More cleanup and positioning
Adamj1232 May 29, 2022
4b14fb6
Add css variables
Adamj1232 May 29, 2022
5c4274c
Fix and style timer
Adamj1232 May 29, 2022
3670eb6
More cleanup
Adamj1232 May 30, 2022
61680b5
Updated structure and componentized further
Adamj1232 May 31, 2022
0d02808
cleanup
Adamj1232 May 31, 2022
e698895
Add flags to denote v1 ref code
Adamj1232 May 31, 2022
20f80a4
Playing around with organisation
lnbc1QWFyb24 Jun 3, 2022
7f8c0de
In progress
lnbc1QWFyb24 Jun 3, 2022
d9005eb
Merge branch 'v2-web3-onboard-develop' into feature/transaction-notif…
lnbc1QWFyb24 Jun 3, 2022
b49b1a5
Progress
lnbc1QWFyb24 Jun 3, 2022
fc39788
Progress
lnbc1QWFyb24 Jun 6, 2022
ca70f46
Working notifications
lnbc1QWFyb24 Jun 7, 2022
3f84085
Latest SDK branch
lnbc1QWFyb24 Jun 7, 2022
2b6dc47
Add timeout to unsub calls
lnbc1QWFyb24 Jun 8, 2022
0a99d42
Merge branch 'v2-web3-onboard-develop' into feature/transaction-notif…
lnbc1QWFyb24 Jun 8, 2022
c8dca6c
Add timeout to disconnect
lnbc1QWFyb24 Jun 8, 2022
4889dff
Use NotifyEventStyles type
lnbc1QWFyb24 Jun 8, 2022
89c5118
Update comments
lnbc1QWFyb24 Jun 8, 2022
a4c78dd
Tidy up import statements
lnbc1QWFyb24 Jun 8, 2022
910c6e2
Update docs
Adamj1232 Jun 8, 2022
b9db596
Update versions
lnbc1QWFyb24 Jun 8, 2022
ecaed63
Componentise notification
lnbc1QWFyb24 Jun 8, 2022
95f53ab
Add margin to modal
lnbc1QWFyb24 Jun 8, 2022
462dc21
Remove network from customize notification
lnbc1QWFyb24 Jun 8, 2022
783548c
Add hitnt and error types back
lnbc1QWFyb24 Jun 8, 2022
1cbc680
Throw if invalid custom notification
lnbc1QWFyb24 Jun 8, 2022
b129040
Upgrade sdk and handle unsupported network error
lnbc1QWFyb24 Jun 8, 2022
4a21452
Auto dismiss notification
lnbc1QWFyb24 Jun 8, 2022
c0c1133
More README updates
Adamj1232 Jun 8, 2022
88dfe4b
Merge in Aarons changes
Adamj1232 Jun 8, 2022
af633d3
Update spacing and layout to display properly
Adamj1232 Jun 8, 2022
65d672d
cleanup and more positioning
Adamj1232 Jun 8, 2022
eecba0d
Animations working
Adamj1232 Jun 8, 2022
de3e49d
Fix animation speed, linking in transaction hash
Adamj1232 Jun 8, 2022
9fb4fca
Fix padding on AC
lnbc1QWFyb24 Jun 9, 2022
5e1fccb
Add text color to non-linking transaction hash
Adamj1232 Jun 9, 2022
176a8b2
Merge in develop and fix animations when positioned left
Adamj1232 Jun 9, 2022
1c2c579
More variablization and updating docs
Adamj1232 Jun 9, 2022
d4862c0
Add demo with updates for testing in the future
Adamj1232 Jun 9, 2022
6a9141a
Return the 4 second default dismiss to notifications, Fix margin caus…
Adamj1232 Jun 9, 2022
5bcc28c
Remove margin
lnbc1QWFyb24 Jun 10, 2022
3df6dc6
Update on hover to display close button, chain icon size, add close i…
Adamj1232 Jun 10, 2022
df3224e
Add new hint notification
Adamj1232 Jun 10, 2022
f9ebf37
Merge branch 'feature/transaction-notifications' of blocknative.githu…
Adamj1232 Jun 10, 2022
33ac571
Update README for more info around notifications
Adamj1232 Jun 10, 2022
df97d99
Revert dismiss timeout used for testing
Adamj1232 Jun 10, 2022
6512586
styling touchups
Adamj1232 Jun 10, 2022
226f10f
Add DAPP notifications
Adamj1232 Jun 14, 2022
0e3df6b
reset sizing for network select
Adamj1232 Jun 14, 2022
f9a2bda
Working but needs cleanup
Adamj1232 Jun 14, 2022
3f59629
Update action to return update and dismiss methods
Adamj1232 Jun 14, 2022
3f9fb36
Update docs and remove unneeded type
Adamj1232 Jun 14, 2022
df0bc81
Cleanup of unneeded imports
Adamj1232 Jun 14, 2022
e924fde
Updated styling of notifications for second round of style updates, r…
Adamj1232 Jun 14, 2022
0a5ca56
More styling of new info icon layout
Adamj1232 Jun 14, 2022
88c8a19
Update padding for info icon
Adamj1232 Jun 14, 2022
f54ced6
Handle replacement transactions
lnbc1QWFyb24 Jun 15, 2022
708d2a2
Working on scrolling
Adamj1232 Jun 15, 2022
1018377
Merge branch 'feature/transaction-notifications' into feature/dapp_no…
Adamj1232 Jun 15, 2022
5d7eddc
Update notifications working
Adamj1232 Jun 15, 2022
9e92f0b
Revert scoll on container breaking animations
Adamj1232 Jun 15, 2022
f3e2461
Updates SDK to version with multichain
lnbc1QWFyb24 Jun 15, 2022
2a8fd27
Always display close button on mobile notifications
Adamj1232 Jun 15, 2022
a171a9b
Fix scrolling
Adamj1232 Jun 15, 2022
8c8d9bc
Fix styling on notification container
Adamj1232 Jun 15, 2022
93a52c7
Handle newest notifications entering closest to AC despite location
Adamj1232 Jun 15, 2022
4e71f85
Updated styling of container to allow more space on mobile
Adamj1232 Jun 15, 2022
7170789
Merge in develop
Adamj1232 Jun 15, 2022
b321f1e
Merge branch 'feature/transaction-notifications' into feature/dapp_no…
Adamj1232 Jun 15, 2022
a1faaf0
Update layout for single line notifications
Adamj1232 Jun 15, 2022
032d418
Updates to styling of hash/time container
Adamj1232 Jun 15, 2022
b1b8997
Update styling for new layout
Adamj1232 Jun 15, 2022
4b83672
Working but animation updates coming
Adamj1232 Jun 15, 2022
cce27be
Update layout for all animations to match mobile animations
Adamj1232 Jun 15, 2022
f6aeaa6
Removes unused dep
lnbc1QWFyb24 Jun 15, 2022
99f01dd
Update yarn and remove uuid from dep in core
Adamj1232 Jun 15, 2022
d94a2f1
Merge branch 'feature/transaction-notifications' of blocknative.githu…
Adamj1232 Jun 15, 2022
5edc273
Remove 1rem buffer for animations
Adamj1232 Jun 15, 2022
fb3107f
Revert to 4 second dismiss
Adamj1232 Jun 15, 2022
57deb7e
Update types in action
Adamj1232 Jun 15, 2022
7851613
Add nanoId, update types for notification update method
Adamj1232 Jun 16, 2022
d080f5c
Update animations of removal
Adamj1232 Jun 16, 2022
6ccb8ad
Fix comment to reflect functionality
Adamj1232 Jun 16, 2022
14394e5
Fix pending on safari
Adamj1232 Jun 16, 2022
281817a
Update packages/core/rollup.config.js
Adamj1232 Jun 16, 2022
abee655
Update packages/demo/src/App.svelte
Adamj1232 Jun 16, 2022
8d232d9
remove unused import
Adamj1232 Jun 16, 2022
24bff92
Merge in develop
Adamj1232 Jun 16, 2022
3aa25e7
merge in dev
Adamj1232 Jun 16, 2022
7bc0a66
Update types and remove unneeded import
Adamj1232 Jun 16, 2022
b27195b
Fix animation cutoff on end of list when removing an element
Adamj1232 Jun 16, 2022
ade426a
Update readme
Adamj1232 Jun 17, 2022
5b9ce35
Update packages/core/README.md
Adamj1232 Jun 17, 2022
b258629
Update packages/core/README.md
Adamj1232 Jun 17, 2022
0da053d
Update packages/core/README.md
Adamj1232 Jun 17, 2022
6f6a0a4
Update packages/core/README.md
Adamj1232 Jun 17, 2022
047afd5
Update packages/core/README.md
Adamj1232 Jun 17, 2022
04613e8
Update packages/demo/src/App.svelte
Adamj1232 Jun 17, 2022
4e78bf4
Update packages/core/README.md
Adamj1232 Jun 17, 2022
2a70a80
Update packages/core/README.md
Adamj1232 Jun 17, 2022
00e11b8
Update packages/core/README.md
Adamj1232 Jun 17, 2022
8f0341a
Update packages/core/README.md
Adamj1232 Jun 17, 2022
20d13d0
Merge in latest dev and update versions
Adamj1232 Jun 17, 2022
f3f63d2
Merge branch 'feature/transaction-notifications' of blocknative.githu…
Adamj1232 Jun 17, 2022
5e4a038
Fix styling and scroll direction when notifications are placed on bot…
Adamj1232 Jun 17, 2022
b7d9bcc
Merge branch 'v2-web3-onboard-develop' into feature/transaction-notif…
Adamj1232 Jun 20, 2022
3553ea3
Add latest packages to Core README
Adamj1232 Jun 20, 2022
95fcb2c
Handle scroll container withaccount center expanded
Adamj1232 Jun 20, 2022
fbdc4f7
Update touch-events for scroll on mobile
Adamj1232 Jun 20, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "2.0.2",
"private": true,
"workspaces": [
"./packages/*"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Adamj1232 What did removing the ./ prefix resolve?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@taylorjdawson Im not too sure, @aaronbarnardsound added that

"packages/*"
],
"scripts": {
"install-m1-mac": "yarn install --ignore-optional",
Expand Down
138 changes: 138 additions & 0 deletions packages/core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ type InitOptions {
appMetadata?: AppMetadata
i18n?: i18nOptions
accountCenter?: AccountCenterOptions
apiKey?: string
notify?: Partial<NotifyOptions>
}
```

Expand Down Expand Up @@ -116,6 +118,99 @@ type AccountCenterPosition =
| 'topLeft'
```

**`notify`**
Notify provides by default transaction notifications for all connected wallets on the current blockchain. When switching chains the previous chain listeners remain active for 60 seconds to allow capture and report of an remaining transactions that may be in flight.
By default transaction notifications are captured if a DAppID is provided in the Onboard config along with the Account Center being enabled.
An object that defines whether transaction notifications will display (defaults to true if an API key is provided). This object contains an `enabled` flag prop and an optional `transactionHandler` which is a callback that can disable or allow customizations of notifications.
Currently notifications positions in the same location as the account center(either below - if the Account Center is positioned along the top, or above if positioned on the bottom of the view).
Adamj1232 marked this conversation as resolved.
Show resolved Hide resolved
The transactionHandler can react off any property of the Ethereum TransactionData returned to the callback from the event(see console.log in example init) and in turn can return a Custom Notification object to define the verbiage, styling or add functionality:
Adamj1232 marked this conversation as resolved.
Show resolved Hide resolved
- `Notification.message` - to completely customize the message shown
- `Notification.eventCode` - Handle codes in your own way - see codes here under the notify prop [default en file here](src/i18n/en.json)
Adamj1232 marked this conversation as resolved.
Show resolved Hide resolved
- `Notification.type` - icon type displayed (see NotificationType below for options)
Adamj1232 marked this conversation as resolved.
Show resolved Hide resolved
- `Notification.autoDismiss` - time on screen
Adamj1232 marked this conversation as resolved.
Show resolved Hide resolved
- `Notification.link` - add link to hash
Adamj1232 marked this conversation as resolved.
Show resolved Hide resolved
- `Notification.onClick()` - notification body click event
Adamj1232 marked this conversation as resolved.
Show resolved Hide resolved

Notify can also be completely styled by using the CSS variables found below. These are setup to allow for maximum customization with base styling variables setting to global the global more themed styling (i.e. `--onboard-grey-600`) as well as a more precise component level styling available (`--notify-onboard-grey-600`) with the latter taking precedent if defined
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are setup to allow for maximum customization with base styling variables setting to global the global more themed styling

@Adamj1232 this sentence is a little confusing I think 🤔

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That sentence makes 0 sense, lol thanks for pointing that out!

Adamj1232 marked this conversation as resolved.
Show resolved Hide resolved

If notifications are enabled the notifications can be handled through onboard app state as seen below.
```javascript
const wallets = onboard.state.select('notifications')
const { unsubscribe } = wallets.subscribe(update =>
console.log('transaction notifications: ', update)
)

// unsubscribe when updates are no longer needed
unsubscribe()
```

```typescript
export type NotifyOptions = {
enabled: boolean // default: true
/**
* Callback that receives all transaction events
* Return a custom notification based on the event
* Or return false to disable notification for this event
* Or return undefined for a default notification
*/
transactionHandler?: (
event: EthereumTransactionData
) => TransactionHandlerReturn
}

export type TransactionHandlerReturn = CustomNotification | boolean | void

export type CustomNotification = Partial<Omit<Notification, 'id' | 'startTime'>>

export type Notification = {
id: string
key: string
type: NotificationType
network: Network
startTime?: number
eventCode: string
message: string
autoDismiss: number
link?: string
onclick?: (event: Event) => void
}

export type NotificationType = 'pending' | 'success' | 'error' | 'hint'

export declare type Network = 'main' | 'testnet' | 'ropsten' | 'rinkeby' | 'goerli' | 'kovan' | 'xdai' | 'bsc-main' | 'matic-main' | 'fantom-main' | 'matic-mumbai' | 'local';

export interface UpdateNotification {
(notificationObject: CustomNotification): {
dismiss: () => void
update: UpdateNotification
}
}
```

Notify can be used to deliver custom DApp notifications by passing a `CustomNotification` object to the `customNotification` action and will be returned a `UpdateNotification` type.
Adamj1232 marked this conversation as resolved.
Show resolved Hide resolved
This `UpdateNotification` will return an `update` function that can be passed a new `CustomNotification` to update the existing notification.
The `customNotification` method also returns a `dismiss` method that is called without any parameters to dismiss the notification.

```typescript
const { update, dismiss } =
onboard.state.actions.customNotification({
type: 'pending',
message:
'This is a custom DApp pending notification to use however you want',
autoDismiss: 0
Adamj1232 marked this conversation as resolved.
Show resolved Hide resolved
})
setTimeout(
() =>
update({
eventCode: 'dbUpdateSuccess',
message: 'Updated status for custom notification',
type: 'success',
autoDismiss: 8000
}),
4000
)
```

### Initialization Example

Putting it all together, here is an example initialization with the injected wallet modules:
Expand Down Expand Up @@ -176,6 +271,19 @@ const onboard = Onboard({
{ name: 'Coinbase', url: 'https://wallet.coinbase.com/' }
]
},
apiKey: 'xxx387fb-bxx1-4xxc-a0x3-9d37e426xxxx'
notify: {
enabled: true,
transactionHandler: transaction => {
console.log({ transaction })
if (transaction.eventCode === 'txPool') {
return {
type: 'success',
message: 'Your transaction from #1 DApp is in the mempool',
}
}
}
},
accountCenter: {
desktop: {
position: 'topRight',
Expand All @@ -194,6 +302,20 @@ const onboard = Onboard({
selectingWallet: {
header: 'custom text header'
}
},
notify: {
transaction: {
txStuck: 'custom text for this notification event'
},
watched: {
// Any words in brackets can be re-ordered or removed to fit your dapps desired verbiage
"txPool": "Your account is {verb} {formattedValue} {asset} {preposition} {counterpartyShortened}"
}
}
},
es: {
transaction: {
txRequest: 'Su transacción está esperando que confirme'
}
}
}
Expand Down Expand Up @@ -285,6 +407,9 @@ type AppState = {
chains: Chain[]
accountCenter: AccountCenter
walletModules: WalletModule[]
locale: Locale
notify: NotifyOptions
notifications: Notification[]
}

type Chain {
Expand Down Expand Up @@ -605,6 +730,19 @@ The Onboard styles can customized via [CSS variables](https://developer.mozilla.
/* SPACING */
--account-select-modal-margin-4: 1rem;
--account-select-modal-margin-5: 0.5rem;

/* notify STYLES */
--notify-onboard-font-family-normal
--notify-onboard-font-size-5
--notify-onboard-gray-300
--notify-onboard-gray-600
--notify-onboard-border-radius
--notify-onboard-font-size-7
--notify-onboard-font-size-6
--notify-onboard-line-height-4
--notify-onboard-primary-100
--notify-onboard-primary-400
--notify-onboard-main-padding
}
```

Expand Down
5 changes: 4 additions & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@web3-onboard/core",
"version": "2.2.13-alpha.2",
"version": "2.3.0-alpha.3",
"scripts": {
"build": "rollup -c",
"dev": "rollup -c -w",
Expand Down Expand Up @@ -42,12 +42,15 @@
},
"dependencies": {
"@web3-onboard/common": "^2.1.2-alpha.1",
"bignumber.js": "^9.0.0",
"bnc-sdk": "^4.4.0",
"bowser": "^2.11.0",
"ethers": "5.5.3",
"eventemitter3": "^4.0.7",
"joi": "17.6.0",
"lodash.merge": "^4.6.2",
"lodash.partition": "^4.6.0",
"nanoid": "^4.0.0",
"rxjs": "^7.5.2",
"svelte": "^3.46.4",
"svelte-i18n": "^3.3.13"
Expand Down
7 changes: 5 additions & 2 deletions packages/core/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import replace from '@rollup/plugin-replace'
import json from '@rollup/plugin-json'
import sveltePreprocess from 'svelte-preprocess'
import typescript from '@rollup/plugin-typescript'
import copy from '@rollup-extras/plugin-copy';
import copy from '@rollup-extras/plugin-copy'

const production = !process.env.ROLLUP_WATCH

Expand Down Expand Up @@ -51,6 +51,9 @@ export default {
'svelte/store',
'lodash.merge',
'lodash.partition',
'eventemitter3'
'eventemitter3',
'bignumber.js',
'bnc-sdk',
'nanoid'
]
}
13 changes: 13 additions & 0 deletions packages/core/src/configuration.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import type { Configuration } from './types'
import { getDevice } from './utils'

export let configuration: Configuration = {
svelteInstance: null,
appMetadata: null,
apiKey: null,
device: getDevice()
}

export function updateConfiguration(update: Partial<Configuration>): void {
configuration = { ...configuration, ...update }
}
9 changes: 7 additions & 2 deletions packages/core/src/constants.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { internalState } from './internals'
import { configuration } from './configuration'
import type { AppState } from './types'

export const APP_INITIAL_STATE: AppState = {
Expand All @@ -9,8 +9,13 @@ export const APP_INITIAL_STATE: AppState = {
enabled: true,
position: 'topRight',
expanded: false,
minimal: internalState.device.type === 'mobile'
minimal: configuration.device.type === 'mobile'
},
notify: {
enabled: true,
transactionHandler: () => {}
},
notifications: [],
locale: ''
}

Expand Down
18 changes: 18 additions & 0 deletions packages/core/src/disconnect.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { getBlocknativeSdk } from './services'
import { state } from './store'
import { removeWallet } from './store/actions'
import { disconnectWallet$ } from './streams'
Expand All @@ -12,6 +13,23 @@ async function disconnect(options: DisconnectOptions): Promise<WalletState[]> {

const { label } = options

if (state.get().notify.enabled) {
// handle unwatching addresses
const sdk = await getBlocknativeSdk()

if (sdk) {
const wallet = state.get().wallets.find(wallet => wallet.label === label)

wallet.accounts.forEach(({ address }) => {
sdk.unsubscribe({
id: address,
chainId: wallet.chains[0].id,
timeout: 60000
})
})
}
}

disconnectWallet$.next(label)
removeWallet(label)

Expand Down
32 changes: 32 additions & 0 deletions packages/core/src/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,37 @@
"addAccount": "Add Account",
"setPrimaryAccount": "Set Primary Account",
"disconnectWallet": "Disconnect Wallet"
},
"notify": {
"transaction": {
"txRequest": "Your transaction is waiting for you to confirm",
"nsfFail": "You have insufficient funds to complete this transaction",
"txUnderpriced": "The gas price for your transaction is too low, try again with a higher gas price",
"txRepeat": "This could be a repeat transaction",
"txAwaitingApproval": "You have a previous transaction waiting for you to confirm",
"txConfirmReminder": "Please confirm your transaction to continue, the transaction window may be behind your browser",
"txSendFail": "You rejected the transaction",
"txSent": "Your transaction has been sent to the network",
"txStallPending": "Your transaction has stalled and has not entered the transaction pool",
"txStuck": "Your transaction is stuck due to a nonce gap",
"txPool": "Your transaction has started",
"txStallConfirmed": "Your transaction has stalled and hasn't been confirmed",
"txSpeedUp": "Your transaction has been sped up",
"txCancel": "Your transaction is being canceled",
"txFailed": "Your transaction has failed",
"txConfirmed": "Your transaction has succeeded",
"txError": "Oops something went wrong, please try again"
},
"watched": {
"txPool": "Your account is {verb} {formattedValue} {asset} {preposition} {counterpartyShortened}",
"txSpeedUp": "Transaction for {formattedValue} {asset} {preposition} {counterpartyShortened} has been sped up",
"txCancel": "Transaction for {formattedValue} {asset} {preposition} {counterpartyShortened} has been canceled",
"txConfirmed": "Your account successfully {verb} {formattedValue} {asset} {preposition} {counterpartyShortened}",
"txFailed": "Your account failed to {verb} {formattedValue} {asset} {preposition} {counterpartyShortened}"
},
"time": {
"minutes": "min",
"seconds": "sec"
}
}
}
5 changes: 5 additions & 0 deletions packages/core/src/icons/checkmark.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export default `
<svg width="14" height="11" viewBox="0 0 14 11" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M4.48076 8.10881L1.33076 4.95881L0.280762 6.00881L4.48076 10.2088L13.4808 1.20881L12.4308 0.158813L4.48076 8.10881Z" fill="#A4F4C6"/>
</svg>
`
5 changes: 5 additions & 0 deletions packages/core/src/icons/close-circle.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export default `
<svg width="100%" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M10 0C4.47 0 0 4.47 0 10C0 15.53 4.47 20 10 20C15.53 20 20 15.53 20 10C20 4.47 15.53 0 10 0ZM15 13.59L13.59 15L10 11.41L6.41 15L5 13.59L8.59 10L5 6.41L6.41 5L10 8.59L13.59 5L15 6.41L11.41 10L15 13.59Z" fill="currentColor"/>
</svg>
`
4 changes: 4 additions & 0 deletions packages/core/src/icons/error.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export default `<svg width="16" height="13" viewBox="0 0 16 13" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M0.666992 13.0002H15.3337L8.00033 0.333496L0.666992 13.0002ZM8.66699 11.0002H7.33366V9.66683H8.66699V11.0002ZM8.66699 8.3335H7.33366V5.66683H8.66699V8.3335Z" fill="#FFB3B3"/>
</svg>
`
5 changes: 5 additions & 0 deletions packages/core/src/icons/hourglass.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export default `
<svg width="100%" height="100%" viewBox="0 0 12 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M0 0L0.0100002 6L4 10L0.0100002 14.01L0 20H12V14L8 10L12 6.01V0H0ZM10 14.5V18H2V14.5L6 10.5L10 14.5Z" fill="#929BED"/>
</svg>
`
Loading