Skip to content

Commit

Permalink
Merge branch 'main' into add-blob-storage
Browse files Browse the repository at this point in the history
  • Loading branch information
mask-pp committed Mar 9, 2024
2 parents 9291a6e + 250033a commit c34e4b7
Show file tree
Hide file tree
Showing 11 changed files with 105 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"packages/blob-catcher": "0.1.0",
"packages/branding": "0.3.0",
"packages/bridge-ui": "2.9.3",
"packages/bridge-ui": "3.0.0",
"packages/eventindexer": "0.13.0",
"packages/fork-diff": "0.4.0",
"packages/guardian-prover-health-check": "0.1.0",
Expand Down
14 changes: 14 additions & 0 deletions packages/bridge-ui/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Changelog

## [3.0.0](https://github.com/taikoxyz/taiko-mono/compare/bridge-ui-v2.9.3...bridge-ui-v3.0.0) (2024-03-08)


### ⚠ BREAKING CHANGES

* **bridge-ui:** walletconnect not allowing to switch to unconfigured chains ([#16324](https://github.com/taikoxyz/taiko-mono/issues/16324))

### Bug Fixes

* **bridge-ui:** fix ETH self claiming ([#16344](https://github.com/taikoxyz/taiko-mono/issues/16344)) ([4271f0d](https://github.com/taikoxyz/taiko-mono/commit/4271f0d2b01da8179d604a0fbff0816a0d72e547))
* **bridge-ui:** manual import not resetting correctly ([#16347](https://github.com/taikoxyz/taiko-mono/issues/16347)) ([87398fe](https://github.com/taikoxyz/taiko-mono/commit/87398fe9606cf73ce66ed4f8321368fe8ac8fbb4))
* **bridge-ui:** preserve custom processing fee selection across components ([#16346](https://github.com/taikoxyz/taiko-mono/issues/16346)) ([9cf6b3a](https://github.com/taikoxyz/taiko-mono/commit/9cf6b3ae0981d1755d253cd7d6238771898fc3f4))
* **bridge-ui:** walletconnect not allowing to switch to unconfigured chains ([#16324](https://github.com/taikoxyz/taiko-mono/issues/16324)) ([d6ef79e](https://github.com/taikoxyz/taiko-mono/commit/d6ef79eae0836a9dabd481cd0953bc03eea9bf7a))

## [2.9.3](https://github.com/taikoxyz/taiko-mono/compare/bridge-ui-v2.9.2...bridge-ui-v2.9.3) (2024-02-26)


Expand Down
2 changes: 1 addition & 1 deletion packages/bridge-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bridge-ui",
"version": "2.9.3",
"version": "3.0.0",
"private": true,
"scripts": {
"dev": "vite dev",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<div class="space-y-[30px] mt-[30px]">
{#if activeStep === BridgeSteps.IMPORT}
<!-- IMPORT STEP -->
<ImportStep />
<ImportStep bind:hasEnoughEth />
{:else if activeStep === BridgeSteps.REVIEW}
<!-- REVIEW STEP -->
<ReviewStep
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,28 @@
<script lang="ts">
import { importDone } from '$components/Bridge/state';
import { onMount } from 'svelte';
import { importDone, processingFeeMethod, recipientAddress } from '$components/Bridge/state';
import { ChainSelector, ChainSelectorType } from '$components/ChainSelectors';
import { ProcessingFeeMethod } from '$libs/fee';
import TokenInput from './TokenInput/TokenInput.svelte';
let validInput = false;
export let hasEnoughEth: boolean = false;
const reset = () => {
$recipientAddress = null;
$processingFeeMethod = ProcessingFeeMethod.RECOMMENDED;
};
onMount(async () => {
reset();
});
$: $importDone = validInput;
</script>

<ChainSelector type={ChainSelectorType.COMBINED} />

<TokenInput bind:validInput />
<TokenInput bind:validInput bind:hasEnoughEth />
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
const log = getLogger('TokenInput');
export let validInput = false;
export let hasEnoughEth: boolean = false;
let inputId = `input-${uid()}`;
let inputBox: InputBox;
Expand Down Expand Up @@ -280,7 +281,7 @@
<div class="f-row items-center gap-1">
<Icon type="info-circle" size={15} fillClass="fill-tertiary-content" /><span
class="text-sm text-tertiary-content"
>{$t('recipient.label')} <ProcessingFee textOnly class="text-tertiary-content" /></span>
>{$t('recipient.label')} <ProcessingFee textOnly class="text-tertiary-content" bind:hasEnoughEth /></span>
</div>
{:else if showInsufficientBalanceAlert}
<FlatAlert type="error" message={$t('bridge.errors.insufficient_balance.title')} class="relative " />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
export let small = false;
export let textOnly = false;
export let hasEnoughEth = false;
export let hasEnoughEth: boolean = false;
export let disabled = false;
let dialogId = `dialog-${uid()}`;
Expand Down Expand Up @@ -113,7 +113,7 @@
}
function unselectNoneIfNotEnoughETH(method: ProcessingFeeMethod, enoughEth: boolean) {
if (method === ProcessingFeeMethod.NONE && !enoughEth) {
if (method === ProcessingFeeMethod.NONE && enoughEth === false) {
$processingFeeMethod = ProcessingFeeMethod.RECOMMENDED;
// We need to manually trigger this update because we are already in an update
Expand Down
26 changes: 22 additions & 4 deletions packages/eventindexer/docs/docs.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 21 additions & 1 deletion packages/eventindexer/docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
}
}
},
"/chartByTask": {
"/chart/chartByTask": {
"get": {
"consumes": ["application/json"],
"produces": ["application/json"],
Expand All @@ -53,6 +53,20 @@
"name": "task",
"in": "query",
"required": true
},
{
"type": "string",
"description": "start date",
"name": "start",
"in": "query",
"required": true
},
{
"type": "string",
"description": "end date",
"name": "end",
"in": "query",
"required": true
}
],
"responses": {
Expand Down Expand Up @@ -280,6 +294,12 @@
"paginate.Page": {
"type": "object",
"properties": {
"error": {
"type": "boolean"
},
"error_message": {
"type": "string"
},
"first": {
"type": "boolean"
},
Expand Down
16 changes: 15 additions & 1 deletion packages/eventindexer/docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ definitions:
type: object
paginate.Page:
properties:
error:
type: boolean
error_message:
type: string
first:
type: boolean
items: {}
Expand Down Expand Up @@ -113,7 +117,7 @@ paths:
schema:
$ref: "#/definitions/paginate.Page"
summary: Get assigned blocks by prover address
/chartByTask:
/chart/chartByTask:
get:
consumes:
- application/json
Expand All @@ -124,6 +128,16 @@ paths:
name: task
required: true
type: string
- description: start date
in: query
name: start
required: true
type: string
- description: end date
in: query
name: end
required: true
type: string
produces:
- application/json
responses:
Expand Down
13 changes: 10 additions & 3 deletions packages/eventindexer/pkg/http/get_chart_by_task.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,19 @@ import (
// @Summary Get time series data for displaying charts
// @ID get-charts-by-task
// @Param task query string true "task to query"
// @Param start query string true "start date"
// @Param end query string true "end date"
// @Accept json
// @Produce json
// @Success 200 {object} eventindexer.ChartResponse
// @Router /chartByTask [get]
// @Router /chart/chartByTask [get]
func (srv *Server) GetChartByTask(c echo.Context) error {
cached, found := srv.cache.Get(c.QueryParam("task") + c.QueryParam("fee_token_address") + c.QueryParam("tier"))
cacheKey := c.QueryParam("task") +
c.QueryParam("fee_token_address") +
c.QueryParam("tier") +
c.QueryParam("start") +
c.QueryParam("end")
cached, found := srv.cache.Get(cacheKey)

var chart *eventindexer.ChartResponse

Expand All @@ -43,7 +50,7 @@ func (srv *Server) GetChartByTask(c echo.Context) error {
}

srv.cache.Set(
c.QueryParam("task")+c.QueryParam("fee_token_address")+c.QueryParam("tier"),
cacheKey,
chart,
cache.DefaultExpiration,
)
Expand Down

0 comments on commit c34e4b7

Please sign in to comment.