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

chore: prepare release #941

Merged
merged 4 commits into from
Aug 12, 2024
Merged

chore: prepare release #941

merged 4 commits into from
Aug 12, 2024

Conversation

dasanra
Copy link
Collaborator

@dasanra dasanra commented Aug 12, 2024

What it solves

Prepare release to be merged into main

Versions

@safe-global/api-kit: v2.4.4
@safe-global/protocol-kit: v4.0.4
@safe-global/relay-kit: v3.0.4

Main changes

tmjssz and others added 3 commits July 19, 2024 17:25
* Fix + improve the confirm transaction e2e test

The test was incorrect because it used the same transaction hash repeatedly, leading to assertions being made on an already confirmed transaction instead of a newly proposed one. By adding a timestamp to the transaction data, we ensure that each transaction hash is unique.

Additionally, the test incorrectly called the `isValidSignature` function with a transaction hash. This function is intended only for messages, causing the contract call to fail consistently. However, the error was not properly caught; the function merely returns `false` when an error occurs. With the migration to viem, the `isValidSignature` contract call sometimes takes too long to fail, resulting in occasional test timeouts. By removing the incorrect call, we prevent those timeout errors.

* Fix tests by using another Safe address that is not used by the confirmTransaction test
@coveralls
Copy link

coveralls commented Aug 12, 2024

Pull Request Test Coverage Report for Build 10349994982

Details

  • 23 of 30 (76.67%) changed or added relevant lines in 8 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+3.5%) to 78.033%

Changes Missing Coverage Covered Lines Changed/Added Lines %
packages/safe-kit/src/extensions/messages/offChainMessages.ts 0 2 0.0%
packages/safe-kit/src/extensions/messages/onChainMessages.ts 1 3 33.33%
packages/safe-kit/src/extensions/safe-operations/safeOperations.ts 1 4 25.0%
Totals Coverage Status
Change from base Build 9991016091: 3.5%
Covered Lines: 936
Relevant Lines: 1125

💛 - Coveralls

Copy link
Member

@katspaugh katspaugh left a comment

Choose a reason for hiding this comment

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

🚀

@dasanra dasanra merged commit a9e595a into main Aug 12, 2024
19 of 20 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Aug 12, 2024
@dasanra dasanra deleted the prepare-release branch August 12, 2024 11:05
@@ -32,8 +36,9 @@ describe('proposeTransaction', () => {
it('should allow to create and confirm transactions signature using a Safe signer', async () => {
const safeTransactionData: SafeTransactionDataPartial = {
to: safeAddress,
value: '100000000000000000', // 0.01 ETH
data: '0x'
value: '10000000000000000', // 0.01 ETH
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the comment on the right-hand side still correct? You could use the viem#parseEther and remove the comment altogether.

.sort((a, b) => Number(a.chainId - b.chainId))
.map(
(network, index) =>
` { chainId: ${network.chainId}n, shortName: '${network.shortName}' }${index === networks.length - 1 ? '' : ','}`
Copy link
Contributor

@leonardotc leonardotc Aug 14, 2024

Choose a reason for hiding this comment

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

The problem with this thing is that, because we are assembling bits of content in different statements, its hard to understand the outgoing structure. Life would be much kinder to us if it looked more like "stuffing" a template (if possible)... e.g.:

`
    export const networks: NetworkShortName[] = [
        ${sortedNetworks.map(network => `
        {
            chainId: '${network.name}',
            shortName: '${network.shortName}'
        }`).join(',')}
    ]
`

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants