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

GH-1995 - Removed offset as we do the timezone handling in the client. #2004

Merged
merged 2 commits into from
Aug 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import androidx.core.view.isVisible
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.Observer
import androidx.lifecycle.lifecycleScope
import androidx.paging.ExperimentalPagingApi
import androidx.paging.LoadState
import androidx.paging.PagingData
import androidx.recyclerview.widget.LinearLayoutManager
Expand Down
4 changes: 2 additions & 2 deletions data/src/main/java/io/gnosis/data/backend/GatewayApi.kt
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,14 @@ interface GatewayApi {
suspend fun loadTransactionsHistory(
@Path("chainId") chainId: BigInteger,
@Path("address") address: String,
@Query("timezone_offset") timezoneOffset: Int = TimeZone.getDefault().getOffset(Date().time)
@Query("timezone_offset") timezoneOffset: Int = 0
): Page<TxListEntry>

@GET("/v1/chains/{chainId}/safes/{address}/transactions/queued")
suspend fun loadTransactionsQueue(
@Path("chainId") chainId: BigInteger,
@Path("address") address: String,
@Query("timezone_offset") timezoneOffset: Int = TimeZone.getDefault().getOffset(Date().time)
@Query("timezone_offset") timezoneOffset: Int = 0

Choose a reason for hiding this comment

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

Do we need this parameter at all then ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wanted to leave it because it is in the api. And maybe someone wants to use it in the future. I just set the default to 0.

Copy link
Contributor

Choose a reason for hiding this comment

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

Got referenced here from #3327. This change should bring inaccurate grouping of transactions by the date.

Since the client doesn't report the offset to the server, the transaction list can have some transactions appearing in the wrong day, if those transactions made closer to midnight.

): Page<TxListEntry>

@GET
Expand Down