Skip to content

Commit

Permalink
Merge pull request #2818 from build-5/bugfix/sender
Browse files Browse the repository at this point in the history
Remove sender feature
  • Loading branch information
adamunchained authored Feb 20, 2024
2 parents 5c63977 + 7317f79 commit d8e2fb4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ export class NftStakeService extends BaseService {
const wallet = await WalletService.newWallet(order.network);
const weeks = get(order, 'payload.weeks', 0);
const params: NftOutputBuilderParams = cloneDeep(tranEntry.nftOutput as NftOutput);
params.features = params.features?.filter((f) => f.type !== FeatureType.Tag);
params.features = params.features?.filter(
(f) => f.type !== FeatureType.Tag && f.type !== FeatureType.Sender,
);
params.unlockConditions = params.unlockConditions.filter(
(uc) => uc.type !== UnlockConditionType.Timelock,
);
Expand Down
4 changes: 3 additions & 1 deletion packages/functions/src/services/wallet/NftWallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,9 @@ export class NftWallet {
const sourceAddress = await this.wallet.getAddressDetails(transaction.payload.sourceAddress!);
const targetAddress = Utils.parseBech32Address(transaction.payload.targetAddress!);
const output: NftOutputBuilderParams = cloneDeep(nftOutput);
output.features = output.features?.filter((f) => f.type !== FeatureType.Tag);
output.features = output.features?.filter(
(f) => f.type !== FeatureType.Tag && f.type !== FeatureType.Sender,
);
output.unlockConditions = [new AddressUnlockCondition(targetAddress)];

const vestingAt = dayjs(transaction.payload.vestingAt?.toDate());
Expand Down

0 comments on commit d8e2fb4

Please sign in to comment.