Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Classes for representing amounts of money or virtual money.
Currently it has GBP and Chips currencies built in.
# The amount can be given in as the usual value or the integer value:
GBP[5.20] == GBP.new(520) # => true
# They are comparable:
GBP[3.10] > GBP[3.09] # => true
GBP[3.10] > GBP[3.10] # => false
# You can compare with an integer value
GBP[3.10] > 309 # => true
# Equality check is more strict:
GBP[3.10] == 310 # => false
# Objects are instances of Picklive::Currency::Base
GBP[3.10].is_a? Picklive::Currency::Base # => true
GBP[3.10].to_s # => "£3.10"
Chips[100].to_s # => "100 Chips"
Chips[100].class.real? # => false
Chips[100].class.virtual? # => true
GBP[3.10].class.real? # => true
class Transaction
attr_accessor :amount_in_pennies
attr_accessor :currency_code
include Picklive::Currency::ModelMethods
include Picklive::Currency::Converters
currency_field :amount
end
t = Transaction.new
t.amount_in_pennies = 310
t.currency_code = 'GBP'
t.amount # => <GBP:3.1>
t.amount_in_currency # => <GBP:3.1>
t.amount = Chips[100]
t.amount_in_pennies # => 100
t.currency_code # => "chips"
FAQs
Unknown package
We found that picklive-currency demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.