Skip to content

Commit

Permalink
Remove ImmutableSender from AccountOutputBuilder
Browse files Browse the repository at this point in the history
  • Loading branch information
muXxer committed Jan 18, 2024
1 parent 80babde commit 5beadae
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
8 changes: 0 additions & 8 deletions builder/output_builder_account.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,6 @@ func (builder *AccountOutputBuilder) Sender(senderAddr iotago.Address) *AccountO
return builder
}

// ImmutableSender sets/modifies an iotago.SenderFeature as an immutable feature on the output.
// Only call this function on a new iotago.AccountOutput.
func (builder *AccountOutputBuilder) ImmutableSender(senderAddr iotago.Address) *AccountOutputBuilder {
builder.output.ImmutableFeatures.Upsert(&iotago.SenderFeature{Address: senderAddr})

return builder
}

// Metadata sets/modifies an iotago.MetadataFeature on the output.
func (builder *AccountOutputBuilder) Metadata(entries iotago.MetadataFeatureEntries) *AccountOutputBuilder {
builder.output.Features.Upsert(&iotago.MetadataFeature{Entries: entries})
Expand Down
4 changes: 0 additions & 4 deletions builder/output_builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ func TestAccountOutputBuilder(t *testing.T) {
amount iotago.BaseToken = 1337
metadataEntries = iotago.MetadataFeatureEntries{"data": []byte("123456")}
immMetadataEntries = iotago.MetadataFeatureEntries{"data": []byte("654321")}
immSender = tpkg.RandEd25519Address()

blockIssuerKey1 = iotago.Ed25519PublicKeyBlockIssuerKeyFromPublicKey(tpkg.Rand32ByteArray())
blockIssuerKey2 = iotago.Ed25519PublicKeyBlockIssuerKeyFromPublicKey(tpkg.Rand32ByteArray())
Expand All @@ -66,7 +65,6 @@ func TestAccountOutputBuilder(t *testing.T) {
Staking(amount, 1, 1000).
BlockIssuer(iotago.NewBlockIssuerKeys(blockIssuerKey1, blockIssuerKey2, blockIssuerKey3), 100000).
ImmutableMetadata(immMetadataEntries).
ImmutableSender(immSender).
FoundriesToGenerate(5).
Build()
require.NoError(t, err)
Expand All @@ -93,7 +91,6 @@ func TestAccountOutputBuilder(t *testing.T) {
},
},
ImmutableFeatures: iotago.AccountOutputImmFeatures{
&iotago.SenderFeature{Address: immSender},
&iotago.MetadataFeature{Entries: immMetadataEntries},
},
}
Expand Down Expand Up @@ -143,7 +140,6 @@ func TestAccountOutputBuilder(t *testing.T) {
},
},
ImmutableFeatures: iotago.AccountOutputImmFeatures{
&iotago.SenderFeature{Address: immSender},
&iotago.MetadataFeature{Entries: immMetadataEntries},
},
}
Expand Down

0 comments on commit 5beadae

Please sign in to comment.